Added script namespace management mechanism. This allows external native code to add symbols and constructors to the script global namespace. Added IID() static method generation to IDL generator.
This commit is contained in:
@@ -64,7 +64,7 @@ GetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
nsAutoString prop;
|
||||
if (NS_OK == a->GetHref(prop)) {
|
||||
nsConvertStringToJSVal(prop, cx, vp);
|
||||
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
|
||||
}
|
||||
else {
|
||||
return JS_FALSE;
|
||||
@@ -75,7 +75,7 @@ GetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
nsAutoString prop;
|
||||
if (NS_OK == a->GetTarget(prop)) {
|
||||
nsConvertStringToJSVal(prop, cx, vp);
|
||||
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
|
||||
}
|
||||
else {
|
||||
return JS_FALSE;
|
||||
@@ -83,11 +83,11 @@ GetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return nsCallJSScriptObjectGetProperty(a, cx, id, vp);
|
||||
return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, id, vp);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return nsCallJSScriptObjectGetProperty(a, cx, id, vp);
|
||||
return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, id, vp);
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
@@ -112,7 +112,7 @@ SetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case HTMLBASEELEMENT_HREF:
|
||||
{
|
||||
nsAutoString prop;
|
||||
nsConvertJSValToString(prop, cx, *vp);
|
||||
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
|
||||
|
||||
a->SetHref(prop);
|
||||
|
||||
@@ -121,18 +121,18 @@ SetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case HTMLBASEELEMENT_TARGET:
|
||||
{
|
||||
nsAutoString prop;
|
||||
nsConvertJSValToString(prop, cx, *vp);
|
||||
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
|
||||
|
||||
a->SetTarget(prop);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return nsCallJSScriptObjectSetProperty(a, cx, id, vp);
|
||||
return nsJSUtils::nsCallJSScriptObjectSetProperty(a, cx, id, vp);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return nsCallJSScriptObjectSetProperty(a, cx, id, vp);
|
||||
return nsJSUtils::nsCallJSScriptObjectSetProperty(a, cx, id, vp);
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
@@ -145,7 +145,7 @@ SetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
PR_STATIC_CALLBACK(void)
|
||||
FinalizeHTMLBaseElement(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
nsGenericFinalize(cx, obj);
|
||||
nsJSUtils::nsGenericFinalize(cx, obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ FinalizeHTMLBaseElement(JSContext *cx, JSObject *obj)
|
||||
PR_STATIC_CALLBACK(JSBool)
|
||||
EnumerateHTMLBaseElement(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
return nsGenericEnumerate(cx, obj);
|
||||
return nsJSUtils::nsGenericEnumerate(cx, obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ EnumerateHTMLBaseElement(JSContext *cx, JSObject *obj)
|
||||
PR_STATIC_CALLBACK(JSBool)
|
||||
ResolveHTMLBaseElement(JSContext *cx, JSObject *obj, jsval id)
|
||||
{
|
||||
return nsGenericResolve(cx, obj, id);
|
||||
return nsJSUtils::nsGenericResolve(cx, obj, id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user