summaryrefslogtreecommitdiffstats
path: root/chrome_frame/CFInstance.js
diff options
context:
space:
mode:
authorslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 01:06:18 +0000
committerslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-09 01:06:18 +0000
commit1fa8dd983ae9e3f808aa804596d965f02f031aa6 (patch)
tree60f0184daec3ea59f4f6bbd05317115d8269b8e1 /chrome_frame/CFInstance.js
parent442b86af37a9757f535cc7199a2933f4d30628cd (diff)
downloadchromium_src-1fa8dd983ae9e3f808aa804596d965f02f031aa6.zip
chromium_src-1fa8dd983ae9e3f808aa804596d965f02f031aa6.tar.gz
chromium_src-1fa8dd983ae9e3f808aa804596d965f02f031aa6.tar.bz2
Fixes CFInstance to use a longer Deferred standard timeout. Short timeouts caused cancellation of listeners and therefore backlogged RPC callback failure. The API requires that we use a timeout, but upping the default to 10s should accomidate nearly all CF startup delays.
BUG=None TEST=run all the CFInstance tests in a Debug build. TBR=ananta Review URL: http://codereview.chromium.org/464077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/CFInstance.js')
-rw-r--r--chrome_frame/CFInstance.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/chrome_frame/CFInstance.js b/chrome_frame/CFInstance.js
index 90a28f5..048cb29 100644
--- a/chrome_frame/CFInstance.js
+++ b/chrome_frame/CFInstance.js
@@ -601,7 +601,7 @@
}
this._timer = setTimeout(
hitch(this, 'errback', new Error('timeout')),
- (timeout || 1000)
+ (timeout || 10000)
);
this.silentlyCancelled = false;
};
@@ -781,7 +781,7 @@
var fired = this.fired;
var res = this.results[fired];
var cb = null;
- while ((chain.length > 0) && (this.paused == 0)) {
+ while ((chain.length) && (!this.paused)) {
var f = chain.shift()[fired];
if (!f) {
continue;
@@ -1196,8 +1196,12 @@
RPC.prototype._postMessageBacklog = function() {
if (this._open) {
- forEach(this._msgBacklog, this._postMessage, this);
- this._msgBacklog = [];
+ // forEach(this._msgBacklog, this._postMessage, this);
+ // this._msgBacklog = [];
+ while (this._msgBacklog.length) {
+ var msg = this._msgBacklog.shift();
+ this._postMessage(msg);
+ }
}
};
@@ -1210,16 +1214,7 @@
}
};
- // currently no-ops. We may need them in the future
- // RPC.prototype._doWithAck_load = function() { };
- // RPC.prototype._doWithAck_init = function() { };
-
RPC.prototype._doWithAck = function(what) {
- var f = this['_doWithAck_' + what];
- if (f) {
- f.call(this);
- }
-
this._postMessage('doWithAckCallback:' + what, what == 'load');
};