mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 815441 - Make errors pre-empt emulator callback warning, r=mdas
This commit is contained in:
parent
d2d56733bf
commit
f601413333
@ -305,12 +305,6 @@ function createExecuteContentSandbox(aWindow) {
|
||||
sandbox.SpecialPowers = new SpecialPowers(aWindow);
|
||||
|
||||
sandbox.asyncComplete = function sandbox_asyncComplete(value, status) {
|
||||
if (Object.keys(_emu_cbs).length) {
|
||||
_emu_cbs = {};
|
||||
value = "Emulator callback still pending when finish() called";
|
||||
status = 500;
|
||||
}
|
||||
|
||||
curWindow.removeEventListener("unload", errUnload, false);
|
||||
|
||||
/* clear all timeouts potentially generated by the script*/
|
||||
@ -322,9 +316,17 @@ function createExecuteContentSandbox(aWindow) {
|
||||
perf: elementManager.wrapValue(marionettePerf.getPerfData())});
|
||||
marionetteLogObj.clearLogs();
|
||||
marionettePerf.clearPerfData();
|
||||
|
||||
if (status == 0){
|
||||
if (Object.keys(_emu_cbs).length) {
|
||||
_emu_cbs = {};
|
||||
sendError("Emulator callback still pending when finish() called",
|
||||
500, null, asyncTestCommandId);
|
||||
}
|
||||
else {
|
||||
sendResponse({value: elementManager.wrapValue(value), status: status}, asyncTestCommandId);
|
||||
}
|
||||
}
|
||||
else {
|
||||
sendError(value, status, null, asyncTestCommandId);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user