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.SpecialPowers = new SpecialPowers(aWindow);
|
||||||
|
|
||||||
sandbox.asyncComplete = function sandbox_asyncComplete(value, status) {
|
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);
|
curWindow.removeEventListener("unload", errUnload, false);
|
||||||
|
|
||||||
/* clear all timeouts potentially generated by the script*/
|
/* clear all timeouts potentially generated by the script*/
|
||||||
@ -322,8 +316,16 @@ function createExecuteContentSandbox(aWindow) {
|
|||||||
perf: elementManager.wrapValue(marionettePerf.getPerfData())});
|
perf: elementManager.wrapValue(marionettePerf.getPerfData())});
|
||||||
marionetteLogObj.clearLogs();
|
marionetteLogObj.clearLogs();
|
||||||
marionettePerf.clearPerfData();
|
marionettePerf.clearPerfData();
|
||||||
|
|
||||||
if (status == 0){
|
if (status == 0){
|
||||||
sendResponse({value: elementManager.wrapValue(value), status: status}, asyncTestCommandId);
|
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 {
|
else {
|
||||||
sendError(value, status, null, asyncTestCommandId);
|
sendError(value, status, null, asyncTestCommandId);
|
||||||
|
Loading…
Reference in New Issue
Block a user