bug 488995 - fixing error reporting for getter-only properties. r=mrbkap sr=jst
This commit is contained in:
@@ -5987,6 +5987,21 @@ js_IsCallable(JSObject *obj, JSContext *cx)
|
||||
return callable;
|
||||
}
|
||||
|
||||
void
|
||||
js_ReportGetterOnlyAssignment(JSContext *cx)
|
||||
{
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
JSMSG_GETTER_ONLY, NULL);
|
||||
}
|
||||
|
||||
|
||||
JS_FRIEND_API(JSBool)
|
||||
js_GetterOnlyPropertyStub(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
{
|
||||
js_ReportGetterOnlyAssignment(cx);
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user