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

This commit is contained in:
Bobby Holley 2012-01-14 10:29:56 -08:00
Родитель df7b936c1f
Коммит 5fedf53b21
6 изменённых файлов: 22 добавлений и 34 удалений

Просмотреть файл

@ -58,7 +58,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;
@ -96,7 +96,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;
@ -303,7 +303,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)
@ -362,7 +362,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)

Просмотреть файл

@ -93,7 +93,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)
@ -166,7 +166,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)
@ -240,7 +240,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)
@ -300,7 +300,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)
@ -421,7 +421,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)
@ -532,7 +532,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)
@ -606,7 +606,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)
@ -678,7 +678,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)
@ -751,7 +751,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)

Просмотреть файл

@ -778,7 +778,6 @@ getNativeFromWrapper(JSContext *cx,
nsresult
getWrapper(JSContext *cx,
JSObject *obj,
JSObject *callee,
XPCWrappedNative **wrapper,
JSObject **cur,
XPCWrappedNativeTearOff **tearoff)
@ -948,7 +947,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);
}

Просмотреть файл

@ -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,14 +511,14 @@ castNativeFromWrapper(JSContext *cx,
XPCWrappedNativeTearOff *tearoff;
JSObject *cur;
if (!callee && IS_WRAPPER_CLASS(js::GetObjectClass(obj))) {
if (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);
*rv = getWrapper(cx, obj, &wrapper, &cur, &tearoff);
if (NS_FAILED(*rv))
return nsnull;
}
@ -617,7 +614,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*

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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")