Bug 852798 - Don't use JSPROP_READONLY for shell-only customNative property. r=djvj

This commit is contained in:
Jan de Mooij 2013-03-25 10:35:33 +01:00
parent 507071e87c
commit 366fc764c4
2 changed files with 4 additions and 1 deletions

View File

@ -4,3 +4,6 @@ function f() {
}
}
f();
// Don't assert (bug 852798).
Object.getOwnPropertyDescriptor(this, "customNative");

View File

@ -4830,7 +4830,7 @@ NewGlobalObject(JSContext *cx, JSObject *sameZoneAs)
if (!JS_DefineProperty(cx, glob, "customNative", UndefinedValue(),
(JSPropertyOp)its_get_customNative,
(JSStrictPropertyOp)its_set_customNative,
JSPROP_READONLY | JSPROP_NATIVE_ACCESSORS))
JSPROP_NATIVE_ACCESSORS))
return NULL;
/* Initialize FakeDOMObject. */