mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854614 - Root xpc_qsUnwrapThis. r=terrence,bholley
This commit is contained in:
parent
880dfc46bd
commit
acce8e630a
@ -392,7 +392,7 @@ castNative(JSContext *cx,
|
|||||||
template <class T>
|
template <class T>
|
||||||
inline JSBool
|
inline JSBool
|
||||||
xpc_qsUnwrapThis(JSContext *cx,
|
xpc_qsUnwrapThis(JSContext *cx,
|
||||||
JSObject *obj,
|
JS::HandleObject obj,
|
||||||
T **ppThis,
|
T **ppThis,
|
||||||
nsISupports **pThisRef,
|
nsISupports **pThisRef,
|
||||||
jsval *pThisVal,
|
jsval *pThisVal,
|
||||||
@ -401,9 +401,10 @@ xpc_qsUnwrapThis(JSContext *cx,
|
|||||||
{
|
{
|
||||||
XPCWrappedNative *wrapper;
|
XPCWrappedNative *wrapper;
|
||||||
XPCWrappedNativeTearOff *tearoff;
|
XPCWrappedNativeTearOff *tearoff;
|
||||||
nsresult rv = getWrapper(cx, obj, &wrapper, &obj, &tearoff);
|
JS::RootedObject current(cx);
|
||||||
|
nsresult rv = getWrapper(cx, obj, &wrapper, current.address(), &tearoff);
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
rv = castNative(cx, wrapper, obj, tearoff, NS_GET_TEMPLATE_IID(T),
|
rv = castNative(cx, wrapper, current, tearoff, NS_GET_TEMPLATE_IID(T),
|
||||||
reinterpret_cast<void **>(ppThis), pThisRef, pThisVal,
|
reinterpret_cast<void **>(ppThis), pThisRef, pThisVal,
|
||||||
lccx);
|
lccx);
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ NEW_BINDING(nsDOMEvent, Event);
|
|||||||
template <> \
|
template <> \
|
||||||
MOZ_ALWAYS_INLINE JSBool \
|
MOZ_ALWAYS_INLINE JSBool \
|
||||||
xpc_qsUnwrapThis<_interface>(JSContext *cx, \
|
xpc_qsUnwrapThis<_interface>(JSContext *cx, \
|
||||||
JSObject *obj, \
|
JS::HandleObject obj, \
|
||||||
_interface **ppThis, \
|
_interface **ppThis, \
|
||||||
nsISupports **pThisRef, \
|
nsISupports **pThisRef, \
|
||||||
jsval *pThisVal, \
|
jsval *pThisVal, \
|
||||||
|
@ -833,7 +833,7 @@ def writeQuickStub(f, customMethodCalls, stringtable, member, stubName,
|
|||||||
f.write(" XPC_QS_ASSERT_CONTEXT_OK(cx);\n")
|
f.write(" XPC_QS_ASSERT_CONTEXT_OK(cx);\n")
|
||||||
|
|
||||||
# Compute "this".
|
# Compute "this".
|
||||||
f.write(" JSObject *obj = JS_THIS_OBJECT(cx, vp);\n"
|
f.write(" JS::RootedObject obj(cx, JS_THIS_OBJECT(cx, vp));\n"
|
||||||
" if (!obj)\n"
|
" if (!obj)\n"
|
||||||
" return JS_FALSE;\n")
|
" return JS_FALSE;\n")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user