mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 684447. Eliminate the Equality hook on windows, and stub out their class equality hook. r=mrbkap
This commit is contained in:
parent
3f8bbf4336
commit
7341083936
@ -519,9 +519,9 @@ static const char kDOMStringBundleURL[] =
|
||||
(nsIXPCScriptable::WANT_GETPROPERTY | \
|
||||
nsIXPCScriptable::WANT_PRECREATE | \
|
||||
nsIXPCScriptable::WANT_FINALIZE | \
|
||||
nsIXPCScriptable::WANT_EQUALITY | \
|
||||
nsIXPCScriptable::WANT_ENUMERATE | \
|
||||
nsIXPCScriptable::DONT_ENUM_QUERY_INTERFACE | \
|
||||
nsIXPCScriptable::USE_STUB_EQUALITY_HOOK | \
|
||||
nsIXPCScriptable::WANT_OUTER_OBJECT)
|
||||
|
||||
#define NODE_SCRIPTABLE_FLAGS \
|
||||
@ -6919,37 +6919,6 @@ nsWindowSH::Finalize(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowSH::Equality(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
|
||||
JSObject * obj, const jsval &val, PRBool *bp)
|
||||
{
|
||||
*bp = PR_FALSE;
|
||||
|
||||
if (JSVAL_IS_PRIMITIVE(val)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIXPConnectWrappedNative> other_wrapper;
|
||||
nsContentUtils::XPConnect()->
|
||||
GetWrappedNativeOfJSObject(cx, JSVAL_TO_OBJECT(val),
|
||||
getter_AddRefs(other_wrapper));
|
||||
if (!other_wrapper) {
|
||||
// Not equal.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsGlobalWindow *win = nsGlobalWindow::FromWrapper(wrapper);
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> other = do_QueryWrappedNative(other_wrapper);
|
||||
|
||||
if (other) {
|
||||
*bp = win->GetOuterWindow() == other->GetOuterWindow();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWindowSH::OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
|
||||
JSObject * obj, JSObject * *_retval)
|
||||
|
@ -414,8 +414,6 @@ public:
|
||||
JSObject **objp, PRBool *_retval);
|
||||
NS_IMETHOD Finalize(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj);
|
||||
NS_IMETHOD Equality(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
|
||||
JSObject * obj, const jsval &val, PRBool *bp);
|
||||
NS_IMETHOD OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
|
||||
JSObject * obj, JSObject * *_retval);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user