Bug 769273 - part1: Prep for refactoring NukeChromeCrossCompartmentWrappersForGlobal. r=bholley

This commit is contained in:
Gabor Krizsanits 2012-07-17 15:38:53 +02:00
parent a07d3b8c65
commit 99ee1c2936
2 changed files with 2 additions and 4 deletions

View File

@ -6860,7 +6860,8 @@ public:
NS_ENSURE_TRUE(currentInner, NS_OK);
JSObject* obj = currentInner->FastGetGlobalJSObject();
if (obj) {
// We only want to nuke wrappers for chrome->content case
if (obj && !js::IsSystemCompartment(js::GetObjectCompartment(obj))) {
JSContext* cx =
nsContentUtils::ThreadJSContextStack()->GetSafeJSContext();

View File

@ -1090,9 +1090,6 @@ js::NukeChromeCrossCompartmentWrappersForGlobal(JSContext *cx, JSObject *obj,
JSObject *wobj = &e.front().value.get().toObject();
JSObject *wrapped = UnwrapObject(wobj, false);
if (js::IsSystemCompartment(wrapped->compartment()))
continue; // Not interested in chrome->chrome wrappers.
if (nukeGlobal == DontNukeForGlobalObject && wrapped == global)
continue;