author | Jan de Mooij <jdemooij@mozilla.com> |
Thu, 14 Jun 2018 09:07:31 -0700 | |
changeset 422546 | d2931773b28b393aa565dca8da2f4a765fbbdacf |
parent 422545 | e9c6358496ff694f7b4127c02c4dcee0fa8be96a |
child 422547 | 5a19b871c5908ec6a282db75d896c1f3d50a8b92 |
push id | 104289 |
push user | jandemooij@gmail.com |
push date | Thu, 14 Jun 2018 16:13:19 +0000 |
treeherder | mozilla-inbound@fc2ffbc36c07 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | evilpie |
bugs | 1468252 |
milestone | 62.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/src/vm/Compartment.cpp +++ b/js/src/vm/Compartment.cpp @@ -193,25 +193,25 @@ Compartment::wrap(JSContext* cx, Mutable bi.set(copy); return true; } #endif bool Compartment::getNonWrapperObjectForCurrentCompartment(JSContext* cx, MutableHandleObject obj) { - // Ensure that we have entered a compartment. + // Ensure that we have entered a realm. MOZ_ASSERT(cx->global()); // If we have a cross-compartment wrapper, make sure that the cx isn't - // associated with the self-hosting global. We don't want to create + // associated with the self-hosting zone. We don't want to create // wrappers for objects in other runtimes, which may be the case for the - // self-hosting global. - MOZ_ASSERT(!cx->runtime()->isSelfHostingGlobal(cx->global())); - MOZ_ASSERT(!cx->runtime()->isSelfHostingGlobal(&obj->global())); + // self-hosting zone. + MOZ_ASSERT(!cx->runtime()->isSelfHostingZone(cx->zone())); + MOZ_ASSERT(!cx->runtime()->isSelfHostingZone(obj->zone())); // The object is already in the right compartment. Normally same- // compartment returns the object itself, however, windows are always // wrapped by a proxy, so we have to check for that case here manually. if (obj->compartment() == this) { obj.set(ToWindowProxyIfWindow(obj)); return true; }