Bug 948227 - Make the Object.prototype.__proto__ setter strongly warn against its use, for perf reasons (and suggest Object.create instead). r=efaust

--HG--
extra : rebase_source : 9a08df51a56ae531956c0158fcae18c12ee77539
This commit is contained in:
Jeff Walden 2014-01-23 14:35:08 -08:00
parent 8076b43c81
commit 67b9e4a37c

View File

@ -629,9 +629,7 @@ class GlobalObject : public JSObject
// Warn about use of the given __proto__ setter to attempt to mutate an
// object's [[Prototype]], if no prior warning was given.
static bool warnOnceAboutPrototypeMutation(JSContext *cx, HandleObject protoSetter) {
// Temporarily disabled until the second half of bug 948583 lands.
//return warnOnceAbout(cx, protoSetter, WARNED_PROTO_SETTING_SLOW, JSMSG_PROTO_SETTING_SLOW);
return true;
return warnOnceAbout(cx, protoSetter, WARNED_PROTO_SETTING_SLOW, JSMSG_PROTO_SETTING_SLOW);
}
static bool getOrCreateEval(JSContext *cx, Handle<GlobalObject*> global,