зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 503167 (Replace xpc_qsReadOnlySetter with js_GetterOnlyPropertyStub). r=jorendorff, sr=jst.
--HG-- extra : rebase_source : 448b7e44111c8261736156e76c9936030457c40a
This commit is contained in:
Родитель
91e3e477a5
Коммит
02cf383aad
|
@ -1139,7 +1139,7 @@ def writeAttrStubs(f, customMethodCalls, attr):
|
||||||
+ header.attributeNativeName(attr, True))
|
+ header.attributeNativeName(attr, True))
|
||||||
writeQuickStub(f, customMethodCalls, attr, getterName)
|
writeQuickStub(f, customMethodCalls, attr, getterName)
|
||||||
if attr.readonly:
|
if attr.readonly:
|
||||||
setterName = 'xpc_qsReadOnlySetter'
|
setterName = 'js_GetterOnlyPropertyStub'
|
||||||
else:
|
else:
|
||||||
setterName = (attr.iface.name + '_'
|
setterName = (attr.iface.name + '_'
|
||||||
+ header.attributeNativeName(attr, False))
|
+ header.attributeNativeName(attr, False))
|
||||||
|
|
|
@ -1152,14 +1152,6 @@ xpc_qsVariantToJsval(XPCCallContext &ccx,
|
||||||
return JS_TRUE;
|
return JS_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSBool
|
|
||||||
xpc_qsReadOnlySetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
|
||||||
{
|
|
||||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
|
||||||
JSMSG_GETTER_ONLY, NULL);
|
|
||||||
return JS_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void
|
void
|
||||||
xpc_qsAssertContextOK(JSContext *cx)
|
xpc_qsAssertContextOK(JSContext *cx)
|
||||||
|
|
|
@ -442,16 +442,6 @@ xpc_qsVariantToJsval(XPCCallContext &ccx,
|
||||||
uintN paramNum,
|
uintN paramNum,
|
||||||
jsval *rval);
|
jsval *rval);
|
||||||
|
|
||||||
/**
|
|
||||||
* Use this as the setter for readonly attributes. (The IDL readonly
|
|
||||||
* keyword does not map to JSPROP_READONLY. Semantic mismatch.)
|
|
||||||
*
|
|
||||||
* Always fails, with the same error as setting a property that has
|
|
||||||
* JSPROP_GETTER but not JSPROP_SETTER.
|
|
||||||
*/
|
|
||||||
JSBool
|
|
||||||
xpc_qsReadOnlySetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp);
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void
|
void
|
||||||
xpc_qsAssertContextOK(JSContext *cx);
|
xpc_qsAssertContextOK(JSContext *cx);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче