aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranekos2010-10-01 02:11:36 +0000
committeranekos2010-10-01 02:11:36 +0000
commitb854e43f6d749a849866f4b02c11507803375ef6 (patch)
treeef6d629e2ced46979471e9ed67c0d8b4d0bceae6
parent62dde694a3daf46a01bb00e260e42c19eb07d156 (diff)
downloadvimperator-plugins-b854e43f6d749a849866f4b02c11507803375ef6.tar.bz2
cancel したときに restart しちゃうバグ修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@38534 d0d07461-0603-4401-acd4-de1884942a52
-rwxr-xr-xtwittperator.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/twittperator.js b/twittperator.js
index 9a8bc6a..66ad5f4 100755
--- a/twittperator.js
+++ b/twittperator.js
@@ -28,7 +28,7 @@ let PLUGIN_INFO =
<name>Twittperator</name>
<description>Twitter Client using ChirpStream</description>
<description lang="ja">OAuth対応Twitterクライアント</description>
- <version>1.8.0</version>
+ <version>1.8.1</version>
<minVersion>2.3</minVersion>
<maxVersion>2.4</maxVersion>
<author mail="teramako@gmail.com" homepage="http://d.hatena.ne.jp/teramako/">teramako</author>
@@ -1224,6 +1224,7 @@ let PLUGIN_INFO =
function HTTPConnection(url, options) { // {{{
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
+ this.canceled = false;
this.events = {};
this.channel =
@@ -1254,8 +1255,10 @@ let PLUGIN_INFO =
},
cancel: function() {
- if (this.channel)
+ if (this.channel){
+ this.channeled = true;
return this.channel.cancel(Cr.NS_ERROR_NOT_AVAILABLE);
+ }
},
// 実装しないと例外になるメソッドとか
@@ -1276,7 +1279,8 @@ let PLUGIN_INFO =
if (Components.isSuccessCode(status)) {
this.callEvent("onComplete");
} else {
- this.callEvent("onError");
+ if (!this.canceled)
+ this.callEvent("onError");
}
delete this.channel;
},