Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: src/bootstrapper.cc

Issue 1072083002: [es6] don't "replace" Object.prototype.toString for --harmony-tostring (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Final fixup... Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/harmony-tostring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 2d9a13f19a6bc25a74d301c9e8ce07a58a9fc79e..ac6bade303101f5d9c4e2b1dee58b280a34051f1 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1689,7 +1689,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions)
-EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
@@ -1760,6 +1759,17 @@ void Genesis::InitializeGlobal_harmony_reflect() {
}
+void Genesis::InitializeGlobal_harmony_tostring() {
+ Handle<JSObject> builtins(native_context()->builtins());
+
+ Handle<HeapObject> flag(FLAG_harmony_tostring ? heap()->true_value()
+ : heap()->false_value());
+ Runtime::SetObjectProperty(isolate(), builtins,
+ factory()->harmony_tostring_string(), flag,
+ STRICT).Assert();
+}
+
+
Handle<JSFunction> Genesis::InstallInternalArray(
Handle<JSBuiltinsObject> builtins,
const char* name,
« no previous file with comments | « no previous file | src/harmony-tostring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698