Bug 936040 - Fix a rooting analysis false positive in nsWindowSH::PostCreate; r=smaug

--HG--
extra : rebase_source : c295bd28a4413c67fe242f0bcce476037f0d7fee
This commit is contained in:
Terrence Cole 2013-11-07 08:27:47 -08:00
parent 025e9af77c
commit 3b966ef396

View File

@ -2031,6 +2031,8 @@ NS_IMETHODIMP
nsWindowSH::PostCreate(nsIXPConnectWrappedNative *wrapper,
JSContext *cx, JSObject *obj)
{
JS::Rooted<JSObject*> window(cx, obj);
#ifdef DEBUG
nsCOMPtr<nsIScriptGlobalObject> sgo(do_QueryWrappedNative(wrapper));
@ -2043,7 +2045,6 @@ nsWindowSH::PostCreate(nsIXPConnectWrappedNative *wrapper,
const NativeProperties* eventTargetProperties =
EventTargetBinding::sNativePropertyHooks->mNativeProperties.regular;
JS::Rooted<JSObject*> window(cx, obj);
return DefineWebIDLBindingPropertiesOnXPCObject(cx, window, windowProperties, true) &&
DefineWebIDLBindingPropertiesOnXPCObject(cx, window, eventTargetProperties, true) ?
NS_OK : NS_ERROR_FAILURE;