зеркало из https://github.com/mozilla/gecko-dev.git
continue sync of other engines even after one of them throws an exception; use constructor name instead of instanceof to check for array object in modules
This commit is contained in:
Родитель
b91391acd5
Коммит
38997acef8
|
@ -510,8 +510,12 @@ WeaveSvc.prototype = {
|
|||
},
|
||||
_syncEngine: function WeaveSvc__syncEngine(engine) {
|
||||
let self = yield;
|
||||
try {
|
||||
engine.sync(self.cb);
|
||||
yield;
|
||||
} catch(e) {
|
||||
this._log.error(e.toString());
|
||||
}
|
||||
},
|
||||
|
||||
resetServer: function WeaveSync_resetServer(onComplete) {
|
||||
|
|
|
@ -109,8 +109,7 @@ let Utils = {
|
|||
return thing;
|
||||
let ret;
|
||||
|
||||
if (thing instanceof Array) {
|
||||
dump("making a cipy of an array!\n\n");
|
||||
if ("Array" == thing.constructor.name) {
|
||||
ret = [];
|
||||
for (let i = 0; i < thing.length; i++)
|
||||
ret.push(Utils.deepCopy(thing[i]));
|
||||
|
|
Загрузка…
Ссылка в новой задаче