зеркало из 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))
|
||||
writeQuickStub(f, customMethodCalls, attr, getterName)
|
||||
if attr.readonly:
|
||||
setterName = 'xpc_qsReadOnlySetter'
|
||||
setterName = 'js_GetterOnlyPropertyStub'
|
||||
else:
|
||||
setterName = (attr.iface.name + '_'
|
||||
+ header.attributeNativeName(attr, False))
|
||||
|
|
|
@ -1152,14 +1152,6 @@ xpc_qsVariantToJsval(XPCCallContext &ccx,
|
|||
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
|
||||
void
|
||||
xpc_qsAssertContextOK(JSContext *cx)
|
||||
|
|
|
@ -442,16 +442,6 @@ xpc_qsVariantToJsval(XPCCallContext &ccx,
|
|||
uintN paramNum,
|
||||
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
|
||||
void
|
||||
xpc_qsAssertContextOK(JSContext *cx);
|
||||
|
|
Загрузка…
Ссылка в новой задаче