Revision: 24808
Author: [email protected]
Date: Wed Oct 22 14:06:15 2014 UTC
Log: Remove [[PROTOTYPE]] from ObjectToStringHarmony
harmony-tostring needs to emulate InstallFunctions --- InstallFunctions
will fail
in Debug builds because the `toString` property already exists in
Object.prototype.
The fix is to add some of the other features from InstallFunctions() to the
setup of ObjectToStringHarmony.
[email protected]
Review URL: https://codereview.chromium.org/667263004
Patch from Caitlin Potter <[email protected]>.
https://code.google.com/p/v8/source/detail?r=24808
Modified:
/branches/bleeding_edge/src/harmony-tostring.js
=======================================
--- /branches/bleeding_edge/src/harmony-tostring.js Tue Oct 21 17:21:32
2014 UTC
+++ /branches/bleeding_edge/src/harmony-tostring.js Wed Oct 22 14:06:15
2014 UTC
@@ -56,11 +56,19 @@
function HarmonyToStringExtendObjectPrototype() {
%CheckIsBootstrapping();
+ // Can't use InstallFunctions() because will fail in Debug mode.
+ // Emulate InstallFunctions() here.
+ %FunctionSetName(ObjectToStringHarmony, "toString");
+ %FunctionRemovePrototype(ObjectToStringHarmony);
+ %SetNativeFlag(ObjectToStringHarmony);
+
// Set up the non-enumerable functions on the Array prototype object.
var desc = ToPropertyDescriptor({
value: ObjectToStringHarmony
});
DefineOwnProperty($Object.prototype, "toString", desc, false);
+
+ %ToFastProperties($Object.prototype);
}
HarmonyToStringExtendObjectPrototype();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.