Bug 1166406 - use Object.create in sync code, r=rnewman

This commit is contained in:
Gijs Kruitbosch 2015-05-19 19:45:29 +01:00
parent 41be5bed7b
commit 7fbd93437e

View File

@ -194,9 +194,9 @@ this.Async = {
querySpinningly: function querySpinningly(query, names) {
// 'Synchronously' asyncExecute, fetching all results by name.
let storageCallback = {names: names,
syncCb: Async.makeSyncCallback()};
storageCallback.__proto__ = Async._storageCallbackPrototype;
let storageCallback = Object.create(Async._storageCallbackPrototype);
storageCallback.names = names;
storageCallback.syncCb = Async.makeSyncCallback();
query.executeAsync(storageCallback);
return Async.waitForSyncCallback(storageCallback.syncCb);
},