Bug 947632 - Use sendRpcMessage during session store flush (r=ttaubert)
authorBill McCloskey <wmccloskey@mozilla.com>
Sat, 14 Dec 2013 15:51:11 -0800
changeset 160531 24ba20d0a8e5f312bdb8868d29887c251c80cd8a
parent 160530 d6a8a4c5fbd518d30d711a21795772a9d96f3dcd
child 160532 bec71542c0553d95e1f54dbc2f1f33c6ea200f3e
push id25836
push userphilringnalda@gmail.com
push dateMon, 16 Dec 2013 01:58:54 +0000
treeherdermozilla-central@f8fea5ea69a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersttaubert
bugs947632
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 947632 - Use sendRpcMessage during session store flush (r=ttaubert)
browser/components/sessionstore/content/content-sessionStore.js
--- a/browser/components/sessionstore/content/content-sessionStore.js
+++ b/browser/components/sessionstore/content/content-sessionStore.js
@@ -387,17 +387,22 @@ let MessageQueue = {
 
     if (this._timeout) {
       clearTimeout(this._timeout);
       this._timeout = null;
     }
 
     let sync = options && options.sync;
     let startID = (options && options.id) || this._id;
-    let sendMessage = sync ? sendSyncMessage : sendAsyncMessage;
+
+    // We use sendRpcMessage in the sync case because we may have been called
+    // through a CPOW. RPC messages are the only synchronous messages that the
+    // child is allowed to send to the parent while it is handling a CPOW
+    // request.
+    let sendMessage = sync ? sendRpcMessage : sendAsyncMessage;
 
     let data = {};
     for (let [key, id] of this._lastUpdated) {
       // There is no data for the given key anymore because
       // the parent process already marked it as received.
       if (!this._data.has(key)) {
         continue;
       }