mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1345284 - Move variable declarations in test_promise_argument.html, and test_promise_callback_retval.html. r=jmaher
This patch fixes an intermittent bug with the test "test_webassembly_compile.html". That test calls the garbage collector which destroys the variables declared within the function-level scopes in the tests "test_promise_argument.html", and "test_promise_callback_retval.html". Declaring them outside the function scope prevents the variables from being destroyed. MozReview-Commit-ID: 7dMwavRqnFg --HG-- extra : rebase_source : 7ff513eed5e9f4f353de59affb11cb04be3cbbaa
This commit is contained in:
parent
68e7478636
commit
d30da22f2d
@ -13,10 +13,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1323324
|
||||
/** Test for Bug 1323324 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var globalWrapper;
|
||||
function verifyPromiseGlobal(p, global, msg) {
|
||||
// SpecialPowers.Cu.getGlobalForObject returns a SpecialPowers wrapper for
|
||||
// the actual global. We want to grab the underlying object.
|
||||
var globalWrapper = SpecialPowers.Cu.getGlobalForObject(p);
|
||||
globalWrapper = SpecialPowers.Cu.getGlobalForObject(p);
|
||||
is(SpecialPowers.unwrap(globalWrapper), global,
|
||||
msg + " should come from " + global.label);
|
||||
}
|
||||
|
@ -13,18 +13,20 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1323324
|
||||
/** Test for Bug 1323324 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var globalWrapper;
|
||||
function verifyPromiseGlobal(p, global, msg) {
|
||||
// SpecialPowers.Cu.getGlobalForObject returns a SpecialPowers wrapper for
|
||||
// the actual global. We want to grab the underlying object.
|
||||
var globalWrapper = SpecialPowers.Cu.getGlobalForObject(p);
|
||||
globalWrapper = SpecialPowers.Cu.getGlobalForObject(p);
|
||||
is(SpecialPowers.unwrap(globalWrapper), global,
|
||||
msg + " should come from " + global.label);
|
||||
}
|
||||
|
||||
const isXrayArgumentTest = false;
|
||||
|
||||
var func;
|
||||
function getPromise(global, arg) {
|
||||
var func = new global.Function("x", "return x").bind(undefined, arg);
|
||||
func = new global.Function("x", "return x").bind(undefined, arg);
|
||||
return TestFunctions.passThroughCallbackPromise(func);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user