mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 865964. Remove dead WrapCallbackInterface code. r=smaug
This commit is contained in:
parent
7beee2619e
commit
e31b7dba18
@ -1259,19 +1259,6 @@ HasPropertyOnPrototype(JSContext* cx, JSObject* proxy, DOMProxyHandler* handler,
|
||||
return !GetPropertyOnPrototype(cx, proxy, id, &found, NULL) || found;
|
||||
}
|
||||
|
||||
bool
|
||||
WrapCallbackInterface(JSContext *cx, JSObject *scope, nsISupports* callback,
|
||||
JS::Value* vp)
|
||||
{
|
||||
nsCOMPtr<nsIXPConnectWrappedJS> wrappedJS = do_QueryInterface(callback);
|
||||
MOZ_ASSERT(wrappedJS, "How can we not have an XPCWrappedJS here?");
|
||||
JSObject* obj;
|
||||
DebugOnly<nsresult> rv = wrappedJS->GetJSObject(&obj);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv) && obj, "What are we wrapping?");
|
||||
*vp = JS::ObjectValue(*obj);
|
||||
return JS_WrapValue(cx, vp);
|
||||
}
|
||||
|
||||
JSObject*
|
||||
GetXrayExpandoChain(JSObject* obj)
|
||||
{
|
||||
|
@ -1002,26 +1002,6 @@ WrapObject(JSContext* cx, JSObject* scope, JSObject& p, JS::Value* vp)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
WrapCallbackInterface(JSContext *cx, JSObject *scope, nsISupports* callback,
|
||||
JS::Value* vp);
|
||||
|
||||
static inline bool
|
||||
WrapCallbackInterface(JSContext *cx, JSObject *scope, nsISupports& callback,
|
||||
JS::Value* vp)
|
||||
{
|
||||
return WrapCallbackInterface(cx, scope, &callback, vp);
|
||||
}
|
||||
|
||||
// Helper for smart pointers (nsAutoPtr/nsRefPtr/nsCOMPtr).
|
||||
template <template <typename> class SmartPtr, class T>
|
||||
inline bool
|
||||
WrapCallbackInterface(JSContext* cx, JSObject* scope, const SmartPtr<T>& value,
|
||||
JS::Value* vp)
|
||||
{
|
||||
return WrapCallbackInterface(cx, scope, value.get(), vp);
|
||||
}
|
||||
|
||||
// Given an object "p" that inherits from nsISupports, wrap it and return the
|
||||
// result. Null is returned on wrapping failure. This is somewhat similar to
|
||||
// WrapObject() above, but does NOT allow Xrays around the result, since we
|
||||
|
@ -3622,10 +3622,7 @@ if (!returnArray) {
|
||||
else:
|
||||
wrappingCode = ""
|
||||
|
||||
if descriptor.interface.isCallback():
|
||||
wrap = "WrapCallbackInterface(cx, ${obj}, %s, ${jsvalPtr})" % result
|
||||
failed = None
|
||||
elif not descriptor.interface.isExternal() and not descriptor.skipGen:
|
||||
if not descriptor.interface.isExternal() and not descriptor.skipGen:
|
||||
if descriptor.wrapperCache:
|
||||
assert descriptor.nativeOwnership != 'owned'
|
||||
wrapMethod = "WrapNewBindingObject"
|
||||
|
Loading…
Reference in New Issue
Block a user