Call eval() in Sync-async loop to work around crashes on 1.9.2 Fennec.
authorEdward Lee <edilee@mozilla.com>
Fri, 25 Sep 2009 20:53:46 -0700
changeset 45790 a7f7f567f80d244eab9156c6668b1bc019acf829
parent 45789 7baa3d14ee2dfe2a34919bc151c8620b9ef15770
child 45791 17f405e36ef07286ab7f960ead07f583fdc86685
push idunknown
push userunknown
push dateunknown
Call eval() in Sync-async loop to work around crashes on 1.9.2 Fennec.
services/sync/modules/ext/Sync.js
--- a/services/sync/modules/ext/Sync.js
+++ b/services/sync/modules/ext/Sync.js
@@ -113,17 +113,18 @@ function Sync(func, thisArg, callback) {
     }
 
     // Call the async function bound to thisArg with the passed args
     func.apply(thisArg, args);
 
     // Keep waiting until our callback is triggered
     let callbackData = instanceCallback._(SECRET);
     while (callbackData.state == CB_READY)
-      thread.processNextEvent(true);
+      // XXX Work around bug 518220 until jit.chrome doesn't crash Fennec
+      eval(), thread.processNextEvent(true);
 
     // Reset the state of the callback to prepare for another call
     let state = callbackData.state;
     callbackData.state = CB_READY;
 
     // Throw the value the callback decided to fail with
     if (state == CB_FAIL)
       throw callbackData.value;