mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854480 - Remove old-style unwrapping infrastructure. r=mrbkap
This commit is contained in:
parent
e475a79e28
commit
a28b2e9eee
@ -86,22 +86,6 @@ AttachNewConstructorObject(XPCCallContext &ccx, JSObject *aGlobalObject)
|
||||
|
||||
} // namespace XPCNativeWrapper
|
||||
|
||||
namespace xpc {
|
||||
|
||||
JSObject *
|
||||
Unwrap(JSContext *cx, JSObject *wrapper, bool stopAtOuter)
|
||||
{
|
||||
if (js::IsWrapper(wrapper)) {
|
||||
if (xpc::AccessCheck::isScriptAccessOnly(cx, wrapper))
|
||||
return nullptr;
|
||||
return js::UnwrapObject(wrapper, stopAtOuter);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace xpc
|
||||
|
||||
namespace XPCWrapper {
|
||||
|
||||
JSObject *
|
||||
|
@ -47,12 +47,6 @@ IsSecurityWrapper(JSObject *wrapper)
|
||||
return js::IsWrapper(wrapper);
|
||||
}
|
||||
|
||||
inline JSObject *
|
||||
Unwrap(JSContext *cx, JSObject *wrapper, bool stopAtOuter = true)
|
||||
{
|
||||
return xpc::Unwrap(cx, wrapper, stopAtOuter);
|
||||
}
|
||||
|
||||
JSObject *
|
||||
UnsafeUnwrapSecurityWrapper(JSObject *obj);
|
||||
|
||||
|
@ -394,19 +394,6 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats &rtStats,
|
||||
nsIMemoryMultiReporterCallback *cb,
|
||||
nsISupports *closure, size_t *rtTotal = NULL);
|
||||
|
||||
/**
|
||||
* Given an arbitrary object, Unwrap will return the wrapped object if the
|
||||
* passed-in object is a wrapper that Unwrap knows about *and* the
|
||||
* currently running code has permission to access both the wrapper and
|
||||
* wrapped object.
|
||||
*
|
||||
* Since this is meant to be called from functions like
|
||||
* XPCWrappedNative::GetWrappedNativeOfJSObject, it does not set an
|
||||
* exception on |cx|.
|
||||
*/
|
||||
JSObject *
|
||||
Unwrap(JSContext *cx, JSObject *wrapper, bool stopAtOuter = true);
|
||||
|
||||
/**
|
||||
* Throws an exception on cx and returns false.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user