Reviewers: rossberg, Dmitry Lomov (chromium),
Message:
On 2014/10/22 12:28:15, caitp wrote:
mailto:[email protected] changed reviewers:
+ mailto:[email protected], mailto:[email protected]
(I'm still building this patch, but I'm pretty sure it will fix the failure
reported on the other CL)
Description:
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.
Please review this at https://codereview.chromium.org/667263004/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -0 lines):
M src/harmony-tostring.js
Index: src/harmony-tostring.js
diff --git a/src/harmony-tostring.js b/src/harmony-tostring.js
index
282b3a0ffbd23c3a2aa3feaf72144aa07b4143b0..41a84dff6e0079a6ef953f522bf4820c7818742b
100644
--- a/src/harmony-tostring.js
+++ b/src/harmony-tostring.js
@@ -56,11 +56,19 @@ HarmonyToStringExtendSymbolPrototype();
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.