JS_GetPrivate calls now go through a nsJSUtils wrapper that checks up the prototype chain. This is useful for applets where the JSClass instance is set as the proto of the LiveConnect-generated object.

This commit is contained in:
vidur@netscape.com
1999-06-11 22:38:35 +00:00
parent 51354c8d76
commit 7335d4d55f
104 changed files with 377 additions and 377 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ enum HTMLMetaElement_slots {
PR_STATIC_CALLBACK(JSBool)
GetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
nsIDOMHTMLMetaElement *a = (nsIDOMHTMLMetaElement*)JS_GetPrivate(cx, obj);
nsIDOMHTMLMetaElement *a = (nsIDOMHTMLMetaElement*)nsJSUtils::nsGetNativeThis(cx, obj);
// If there's no private data, this must be the prototype, so ignore
if (nsnull == a) {
@@ -152,7 +152,7 @@ GetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
PR_STATIC_CALLBACK(JSBool)
SetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
nsIDOMHTMLMetaElement *a = (nsIDOMHTMLMetaElement*)JS_GetPrivate(cx, obj);
nsIDOMHTMLMetaElement *a = (nsIDOMHTMLMetaElement*)nsJSUtils::nsGetNativeThis(cx, obj);
// If there's no private data, this must be the prototype, so ignore
if (nsnull == a) {