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

Unified Diff: src/d8.cc

Issue 2071343002: Fix Object.prototype.toString() when @@toStringTag is not a string. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add test for global object Created 4 years, 6 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/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index c2f6a40ef3d75b24aa1b35a57f91436cca08c7d2..7b6270745bad9a3b09d28aebb836d8dcb65fddca 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1135,6 +1135,10 @@ Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
String::NewFromUtf8(isolate, "version", NewStringType::kNormal)
.ToLocalChecked(),
FunctionTemplate::New(isolate, Version));
+ global_template->Set(
+ Symbol::GetToStringTag(isolate),
+ String::NewFromUtf8(isolate, "global", NewStringType::kNormal)
+ .ToLocalChecked());
// Bind the Realm object.
Local<ObjectTemplate> realm_template = ObjectTemplate::New(isolate);
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698