From b0812d2dfaee860865fdba0df32bcaa067caf745 Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Tue, 31 Aug 2004 00:04:04 +0000 Subject: [PATCH] Eliminate JS warnings due to a bad prototype chain caused by the global scope pollution class. r+sr=brendan@mozilla.org git-svn-id: svn://10.0.0.236/trunk@161515 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/dom/src/base/nsDOMClassInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp index a37bfc35472..b7ad23e5279 100644 --- a/mozilla/dom/src/base/nsDOMClassInfo.cpp +++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp @@ -3485,6 +3485,9 @@ nsWindowSH::GetInvalidatedGlobalScopePolluter(JSContext *cx, JSObject *obj) ::JS_SetPrivate(cx, proto, nsnull); + // Pull the global scope polluter out of the prototype chain. + ::JS_SetPrototype(cx, obj, ::JS_GetPrototype(cx, proto)); + ::JS_ClearScope(cx, proto); break;