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:
@@ -66,7 +66,7 @@ GetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
nsAutoString prop;
|
||||
if (NS_OK == a->GetContent(prop)) {
|
||||
nsConvertStringToJSVal(prop, cx, vp);
|
||||
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
|
||||
}
|
||||
else {
|
||||
return JS_FALSE;
|
||||
@@ -77,7 +77,7 @@ GetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
nsAutoString prop;
|
||||
if (NS_OK == a->GetHttpEquiv(prop)) {
|
||||
nsConvertStringToJSVal(prop, cx, vp);
|
||||
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
|
||||
}
|
||||
else {
|
||||
return JS_FALSE;
|
||||
@@ -88,7 +88,7 @@ GetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
nsAutoString prop;
|
||||
if (NS_OK == a->GetName(prop)) {
|
||||
nsConvertStringToJSVal(prop, cx, vp);
|
||||
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
|
||||
}
|
||||
else {
|
||||
return JS_FALSE;
|
||||
@@ -99,7 +99,7 @@ GetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
nsAutoString prop;
|
||||
if (NS_OK == a->GetScheme(prop)) {
|
||||
nsConvertStringToJSVal(prop, cx, vp);
|
||||
nsJSUtils::nsConvertStringToJSVal(prop, cx, vp);
|
||||
}
|
||||
else {
|
||||
return JS_FALSE;
|
||||
@@ -107,11 +107,11 @@ GetHTMLMetaElementProperty(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;
|
||||
@@ -136,7 +136,7 @@ SetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case HTMLMETAELEMENT_CONTENT:
|
||||
{
|
||||
nsAutoString prop;
|
||||
nsConvertJSValToString(prop, cx, *vp);
|
||||
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
|
||||
|
||||
a->SetContent(prop);
|
||||
|
||||
@@ -145,7 +145,7 @@ SetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case HTMLMETAELEMENT_HTTPEQUIV:
|
||||
{
|
||||
nsAutoString prop;
|
||||
nsConvertJSValToString(prop, cx, *vp);
|
||||
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
|
||||
|
||||
a->SetHttpEquiv(prop);
|
||||
|
||||
@@ -154,7 +154,7 @@ SetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case HTMLMETAELEMENT_NAME:
|
||||
{
|
||||
nsAutoString prop;
|
||||
nsConvertJSValToString(prop, cx, *vp);
|
||||
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
|
||||
|
||||
a->SetName(prop);
|
||||
|
||||
@@ -163,18 +163,18 @@ SetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case HTMLMETAELEMENT_SCHEME:
|
||||
{
|
||||
nsAutoString prop;
|
||||
nsConvertJSValToString(prop, cx, *vp);
|
||||
nsJSUtils::nsConvertJSValToString(prop, cx, *vp);
|
||||
|
||||
a->SetScheme(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;
|
||||
@@ -187,7 +187,7 @@ SetHTMLMetaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
PR_STATIC_CALLBACK(void)
|
||||
FinalizeHTMLMetaElement(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
nsGenericFinalize(cx, obj);
|
||||
nsJSUtils::nsGenericFinalize(cx, obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ FinalizeHTMLMetaElement(JSContext *cx, JSObject *obj)
|
||||
PR_STATIC_CALLBACK(JSBool)
|
||||
EnumerateHTMLMetaElement(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
return nsGenericEnumerate(cx, obj);
|
||||
return nsJSUtils::nsGenericEnumerate(cx, obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ EnumerateHTMLMetaElement(JSContext *cx, JSObject *obj)
|
||||
PR_STATIC_CALLBACK(JSBool)
|
||||
ResolveHTMLMetaElement(JSContext *cx, JSObject *obj, jsval id)
|
||||
{
|
||||
return nsGenericResolve(cx, obj, id);
|
||||
return nsJSUtils::nsGenericResolve(cx, obj, id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user