Bug 622301 - Remove now-obsolete 'callee' parameter. r=mrbkap

This commit is contained in:
Bobby Holley 2012-01-06 17:29:02 -08:00
parent 727aeb5e13
commit f46a9e22a3
6 changed files with 23 additions and 43 deletions

View File

@ -56,7 +56,7 @@ Canvas2D_SetStyleHelper(JSContext *cx, JSObject *obj, jsid id, jsval *vp,
nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
nsresult rv = NS_OK;
@ -94,7 +94,7 @@ Canvas2D_GetStyleHelper(JSContext *cx, JSObject *obj, jsid id, jsval *vp,
nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
XPCLazyCallContext lccx(JS_CALLER, cx, obj);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, vp, &lccx))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, vp, &lccx))
return JS_FALSE;
nsresult rv;
@ -301,7 +301,7 @@ nsIDOMCanvasRenderingContext2D_GetImageData(JSContext *cx, uintN argc, jsval *vp
nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 4)
@ -360,7 +360,7 @@ nsIDOMCanvasRenderingContext2D_PutImageData(JSContext *cx, uintN argc, jsval *vp
nsIDOMCanvasRenderingContext2D *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 3)

View File

@ -92,7 +92,7 @@ nsIDOMWebGLRenderingContext_BufferData(JSContext *cx, uintN argc, jsval *vp)
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 3)
@ -165,7 +165,7 @@ nsIDOMWebGLRenderingContext_BufferSubData(JSContext *cx, uintN argc, jsval *vp)
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 3)
@ -239,7 +239,7 @@ nsIDOMWebGLRenderingContext_ReadPixels(JSContext *cx, uintN argc, jsval *vp)
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 7)
@ -299,7 +299,7 @@ nsIDOMWebGLRenderingContext_TexImage2D(JSContext *cx, uintN argc, jsval *vp)
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 6 || argc == 7 || argc == 8)
@ -420,7 +420,7 @@ nsIDOMWebGLRenderingContext_TexSubImage2D(JSContext *cx, uintN argc, jsval *vp)
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 7 || argc == 8)
@ -531,7 +531,7 @@ helper_nsIDOMWebGLRenderingContext_Uniform_x_iv(JSContext *cx, uintN argc, jsval
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 2)
@ -605,7 +605,7 @@ helper_nsIDOMWebGLRenderingContext_Uniform_x_fv(JSContext *cx, uintN argc, jsval
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 2)
@ -677,7 +677,7 @@ helper_nsIDOMWebGLRenderingContext_UniformMatrix_x_fv(JSContext *cx, uintN argc,
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 3)
@ -750,7 +750,7 @@ helper_nsIDOMWebGLRenderingContext_VertexAttrib_x_fv(JSContext *cx, uintN argc,
nsIDOMWebGLRenderingContext *self;
xpc_qsSelfRef selfref;
js::AutoValueRooter tvr(cx);
if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
if (!xpc_qsUnwrapThis(cx, obj, &self, &selfref.ptr, tvr.jsval_addr(), nsnull))
return JS_FALSE;
if (argc < 2)

View File

@ -778,7 +778,6 @@ getNativeFromWrapper(JSContext *cx,
nsresult
getWrapper(JSContext *cx,
JSObject *obj,
JSObject *callee,
XPCWrappedNative **wrapper,
JSObject **cur,
XPCWrappedNativeTearOff **tearoff)
@ -947,7 +946,7 @@ xpc_qsUnwrapArgImpl(JSContext *cx,
wrapper = nsnull;
obj2 = src;
} else {
rv = getWrapper(cx, src, nsnull, &wrapper, &obj2, &tearoff);
rv = getWrapper(cx, src, &wrapper, &obj2, &tearoff);
NS_ENSURE_SUCCESS(rv, rv);
}

View File

@ -441,7 +441,6 @@ xpc_qsStringToJsstring(JSContext *cx, nsString &str, JSString **rval);
nsresult
getWrapper(JSContext *cx,
JSObject *obj,
JSObject *callee,
XPCWrappedNative **wrapper,
JSObject **cur,
XPCWrappedNativeTearOff **tearoff);
@ -477,7 +476,6 @@ template <class T>
inline JSBool
xpc_qsUnwrapThis(JSContext *cx,
JSObject *obj,
JSObject *callee,
T **ppThis,
nsISupports **pThisRef,
jsval *pThisVal,
@ -486,7 +484,7 @@ xpc_qsUnwrapThis(JSContext *cx,
{
XPCWrappedNative *wrapper;
XPCWrappedNativeTearOff *tearoff;
nsresult rv = getWrapper(cx, obj, callee, &wrapper, &obj, &tearoff);
nsresult rv = getWrapper(cx, obj, &wrapper, &obj, &tearoff);
if (NS_SUCCEEDED(rv))
rv = castNative(cx, wrapper, obj, tearoff, NS_GET_TEMPLATE_IID(T),
reinterpret_cast<void **>(ppThis), pThisRef, pThisVal,
@ -503,7 +501,6 @@ xpc_qsUnwrapThis(JSContext *cx,
inline nsISupports*
castNativeFromWrapper(JSContext *cx,
JSObject *obj,
JSObject *callee,
PRUint32 interfaceBit,
nsISupports **pRef,
jsval *pVal,
@ -514,17 +511,9 @@ castNativeFromWrapper(JSContext *cx,
XPCWrappedNativeTearOff *tearoff;
JSObject *cur;
if (!callee && IS_WRAPPER_CLASS(js::GetObjectClass(obj))) {
cur = obj;
wrapper = IS_WN_WRAPPER_OBJECT(cur) ?
(XPCWrappedNative*)xpc_GetJSPrivate(obj) :
nsnull;
tearoff = nsnull;
} else {
*rv = getWrapper(cx, obj, callee, &wrapper, &cur, &tearoff);
if (NS_FAILED(*rv))
return nsnull;
}
*rv = getWrapper(cx, obj, &wrapper, &cur, &tearoff);
if (NS_FAILED(*rv))
return nsnull;
nsISupports *native;
if (wrapper) {
@ -617,7 +606,7 @@ castNativeArgFromWrapper(JSContext *cx,
if (!src)
return nsnull;
return castNativeFromWrapper(cx, src, nsnull, bit, pArgRef, vp, nsnull, rv);
return castNativeFromWrapper(cx, src, bit, pArgRef, vp, nsnull, rv);
}
inline nsWrapperCache*

View File

@ -44,7 +44,6 @@ template <> \
inline JSBool \
xpc_qsUnwrapThis<_interface>(JSContext *cx, \
JSObject *obj, \
JSObject *callee, \
_interface **ppThis, \
nsISupports **pThisRef, \
jsval *pThisVal, \
@ -52,7 +51,7 @@ xpc_qsUnwrapThis<_interface>(JSContext *cx, \
bool failureFatal) \
{ \
nsresult rv; \
nsISupports *native = castNativeFromWrapper(cx, obj, callee, _bit, \
nsISupports *native = castNativeFromWrapper(cx, obj, _bit, \
pThisRef, pThisVal, lccx, \
&rv); \
*ppThis = NULL; /* avoids uninitialized warnings in callers */ \
@ -108,7 +107,6 @@ template <>
inline JSBool
xpc_qsUnwrapThis<nsGenericElement>(JSContext *cx,
JSObject *obj,
JSObject *callee,
nsGenericElement **ppThis,
nsISupports **pThisRef,
jsval *pThisVal,
@ -117,7 +115,7 @@ xpc_qsUnwrapThis<nsGenericElement>(JSContext *cx,
{
nsIContent *content;
jsval val;
JSBool ok = xpc_qsUnwrapThis<nsIContent>(cx, obj, callee, &content,
JSBool ok = xpc_qsUnwrapThis<nsIContent>(cx, obj, &content,
pThisRef, &val, lccx,
failureFatal);
if (ok) {

View File

@ -863,12 +863,6 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False):
"JSVAL_TO_OBJECT(JS_CALLEE(cx, vp)));\n")
if isInterfaceType(member.realtype):
f.write(" XPCLazyCallContext lccx(ccx);\n")
elif isInterfaceType(member.realtype):
if isMethod:
f.write(" JSObject *callee = "
"JSVAL_TO_OBJECT(JS_CALLEE(cx, vp));\n")
elif isGetter:
f.write(" JSObject *callee = nsnull;\n")
# Get the 'self' pointer.
if customMethodCall is None or not 'thisType' in customMethodCall:
@ -900,10 +894,10 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False):
if not isSetter and isInterfaceType(member.realtype):
f.write(" XPCLazyCallContext lccx(JS_CALLER, cx, obj);\n")
f.write(" if (!xpc_qsUnwrapThis(cx, obj, callee, &self, "
f.write(" if (!xpc_qsUnwrapThis(cx, obj, &self, "
"&selfref.ptr, %s, &lccx, %s))\n" % (pthisval, unwrapFatalArg))
else:
f.write(" if (!xpc_qsUnwrapThis(cx, obj, nsnull, &self, "
f.write(" if (!xpc_qsUnwrapThis(cx, obj, &self, "
"&selfref.ptr, %s, nsnull, %s))\n" % (pthisval, unwrapFatalArg))
f.write(" return JS_FALSE;\n")