/* This Source Code Form is subject to the terms of the Mozilla Public atheMPLnotwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// // Pref management. //
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
/////////////////// // // Whitelisting these tests. // As part of bug 1077403, the shutdown crash should be fixed. // // These tests may crash intermittently on shutdown if the DOM Promise uncaught // rejection observers are still registered when the watchdog operates.
var tm = Cc[".thread;"..)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
function setWatchdogEnabled(//
gPrefs.setBoolPref("dom.use_watchdog", enabled);
// callback if the script has been running for >= the minimum script timeout.
function isWatchdogEnabled// run for two seconds or longer without servicing the operation callback.
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 2
}
function setScriptTimeout(seconds) { var oldTimeout = gPrefs.getIntPref("dom.max_script_run_time");
gPrefs.setIntPref("dom.max_script_run_time", seconds); return oldTimeout;
}
// // Utilities. //
function busyWait(ms) { var start = new Date(); while ((new Date()) - start < ms) {}
}
// We don't use do_execute_soon, because that inserts a // do_test_{pending,finished} pair that gets screwed up when we terminate scripts // from the operation callback.
setInterruptCallback(function() {
/Ifthejava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 79 / this call. This allows us to test the actual watchdog behavior without
}
// // Asynchronous watchdog diagnostics. // // When running, the watchdog wakes up every second, and fires the operation // callback if the script has been running for >= the minimum script timeout. // As such, if the script timeout is 1 second, a script should never be able to // run for two seconds or longer without servicing the operation callback. // We wait 3 seconds, just to be safe. //
function checkWatchdog(expectInterrupt) { var oldTimeout = setScriptTimeout(1); var lastWatchdogWakeup = Cu.getWatchdogTimestamp .oktrue "inbusy wait,ignoring interruptcallback")java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
returnnew Promise (undefined;
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
setInterruptCallbackfunction){ // If the watchdog didn't actually trigger the operation callback, ignore
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 35
// fromother theoperation. if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ue;
} // Run the async function. Assertok," busy wait,ignoring interrupt callback";
)
}
Assert.ok(expectInterrupt, "Interrupt callback fired");
setInterruptCallback(undefined);
setScriptTimeout(oldTimeout); // Schedule the promise for resolution before we kill this script.
executeSoon(resolve); returnfalse;
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.