mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 580128. Call JS_ClearScope on the holder object for XrayWrappers around windows when navigating. r=mrbkap
This commit is contained in:
parent
42c68caa59
commit
a1eae3cb88
@ -125,6 +125,10 @@ endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../../js/src/xpconnect/wrappers \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_X11
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
LDFLAGS += $(TK_LIBS)
|
||||
|
@ -102,6 +102,7 @@
|
||||
#include "nsITimelineService.h"
|
||||
#include "nsDOMScriptObjectHolder.h"
|
||||
#include "prmem.h"
|
||||
#include "WrapperFactory.h"
|
||||
#include "nsGlobalWindow.h"
|
||||
|
||||
#ifdef MOZ_JSDEBUGGER
|
||||
@ -3386,6 +3387,9 @@ nsJSContext::ClearScope(void *aGlobalObj, PRBool aClearFromProtoChain)
|
||||
ac.enterAndIgnoreErrors(mContext, obj);
|
||||
|
||||
JS_ClearScope(mContext, obj);
|
||||
if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
|
||||
JS_ClearScope(mContext, &obj->getProxyExtra().toObject());
|
||||
}
|
||||
if (!obj->getParent()) {
|
||||
JS_ClearRegExpStatics(mContext, obj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user