зеркало из https://github.com/mozilla/pjs.git
Bug 417710 - "Use JS_GET_CLASS, not JS_GetClass" [p=gyuyoung.kim@samsung.com (gyu-young kim) r=jorendorff r=jst sr+a1.9=brendan]
This commit is contained in:
Родитель
ed1a93db5c
Коммит
de0fd36632
|
@ -301,7 +301,7 @@ nsSecurityNameSet::InitializeNameSet(nsIScriptContext* aScriptContext)
|
|||
JSAutoRequest ar(cx);
|
||||
while ((proto = JS_GetPrototype(cx, obj)) != nsnull)
|
||||
obj = proto;
|
||||
JSClass *objectClass = JS_GetClass(cx, obj);
|
||||
JSClass *objectClass = JS_GET_CLASS(cx, obj);
|
||||
|
||||
jsval v;
|
||||
if (!JS_GetProperty(cx, global, "netscape", &v))
|
||||
|
|
|
@ -120,7 +120,7 @@ XBLFinalize(JSContext *cx, JSObject *obj)
|
|||
static_cast<nsIXBLDocumentInfo*>(::JS_GetPrivate(cx, obj));
|
||||
NS_RELEASE(docInfo);
|
||||
|
||||
nsXBLJSClass* c = static_cast<nsXBLJSClass*>(::JS_GetClass(cx, obj));
|
||||
nsXBLJSClass* c = static_cast<nsXBLJSClass*>(::JS_GET_CLASS(cx, obj));
|
||||
c->Drop();
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ XBLResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags,
|
|||
}
|
||||
|
||||
// We have this field. Time to install it. Get our node.
|
||||
JSClass* nodeClass = ::JS_GetClass(cx, origObj);
|
||||
JSClass* nodeClass = ::JS_GET_CLASS(cx, origObj);
|
||||
if (!nodeClass) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
@ -1085,7 +1085,7 @@ nsXBLBinding::ChangeDocument(nsIDocument* aOldDocument, nsIDocument* aNewDocumen
|
|||
break;
|
||||
}
|
||||
|
||||
JSClass* clazz = ::JS_GetClass(cx, proto);
|
||||
JSClass* clazz = ::JS_GET_CLASS(cx, proto);
|
||||
if (!clazz ||
|
||||
(~clazz->flags &
|
||||
(JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS)) ||
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
#endif
|
||||
|
||||
return sXPCNativeWrapperClass &&
|
||||
::JS_GetClass(cx, obj) == sXPCNativeWrapperClass;
|
||||
::JS_GET_CLASS(cx, obj) == sXPCNativeWrapperClass;
|
||||
}
|
||||
|
||||
static nsresult PreserveNodeWrapper(nsIXPConnectWrappedNative *aWrapper);
|
||||
|
|
|
@ -2824,7 +2824,7 @@ nsJSContext::FindXPCNativeWrapperClass(nsIXPConnectJSObjectHolder *aHolder)
|
|||
NS_ASSERTION(JSVAL_IS_OBJECT(wrapper), "This should be an object!");
|
||||
|
||||
NS_DOMClassInfo_SetXPCNativeWrapperClass(
|
||||
::JS_GetClass(mContext, JSVAL_TO_OBJECT(wrapper)));
|
||||
::JS_GET_CLASS(mContext, JSVAL_TO_OBJECT(wrapper)));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,11 +60,7 @@ nsWWJSUtils::GetStaticScriptGlobal(JSContext* aContext, JSObject* aObj)
|
|||
while (nsnull != (parent = JS_GetParent(aContext, glob)))
|
||||
glob = parent;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
clazz = JS_GetClass(aContext, glob);
|
||||
#else
|
||||
clazz = JS_GetClass(glob);
|
||||
#endif
|
||||
clazz = JS_GET_CLASS(aContext, glob);
|
||||
|
||||
if (!clazz ||
|
||||
!(clazz->flags & JSCLASS_HAS_PRIVATE) ||
|
||||
|
|
|
@ -512,11 +512,7 @@ JavaClass_hasInstance(JSContext *cx, JSObject *obj, jsval candidate_jsval,
|
|||
if (!JSVAL_IS_OBJECT(candidate_jsval))
|
||||
goto done;
|
||||
candidate_obj = JSVAL_TO_OBJECT(candidate_jsval);
|
||||
#ifdef JS_THREADSAFE
|
||||
js_class = JS_GetClass(cx, candidate_obj);
|
||||
#else
|
||||
js_class = JS_GetClass(candidate_obj);
|
||||
#endif
|
||||
js_class = JS_GET_CLASS(cx, candidate_obj);
|
||||
if ((js_class != &JavaObject_class) && (js_class != &JavaArray_class))
|
||||
goto done;
|
||||
|
||||
|
|
|
@ -211,11 +211,7 @@ void nsXPITriggerInfo::SaveCallback( JSContext *aCx, jsval aVal )
|
|||
|
||||
JSClass* clazz;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
clazz = ::JS_GetClass(aCx, obj);
|
||||
#else
|
||||
clazz = ::JS_GetClass(obj);
|
||||
#endif
|
||||
clazz = ::JS_GET_CLASS(aCx, obj);
|
||||
|
||||
if (clazz &&
|
||||
(clazz->flags & JSCLASS_HAS_PRIVATE) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче