Only warn for properties that we find on our object, not on properties that we're overriding. bug 365869 and 371174, r=crowder
git-svn-id: svn://10.0.0.236/trunk@221061 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1773,6 +1773,9 @@ js_CheckRedeclaration(JSContext *cx, JSObject *obj, jsid id, uintN attrs,
|
||||
}
|
||||
|
||||
if (attrs == JSPROP_INITIALIZER) {
|
||||
/* Allow the new object to override properties. */
|
||||
if (obj2 != obj)
|
||||
return JS_TRUE;
|
||||
report = JSREPORT_WARNING | JSREPORT_STRICT;
|
||||
} else {
|
||||
/* We allow redeclaring some non-readonly properties. */
|
||||
|
||||
Reference in New Issue
Block a user