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

Unified Diff: src/bootstrapper.cc

Issue 2625093005: [modules] Define @@toStringTag on namespace object as a field. (Closed)
Patch Set: Created 3 years, 11 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/factory.cc » ('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 d26a27bf645ebfd9717bfc5b262b9687612319ad..959721308ba06284b04da758e14a58f41ea4a54f 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2567,11 +2567,14 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
{ // Install @@toStringTag.
PropertyAttributes attribs =
static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY);
- Descriptor d = Descriptor::DataConstant(
- factory->to_string_tag_symbol(),
- factory->NewStringFromAsciiChecked("Module"), attribs);
+ Descriptor d =
+ Descriptor::DataField(factory->to_string_tag_symbol(),
+ JSModuleNamespace::kToStringTagFieldIndex,
+ attribs, Representation::Tagged());
map->AppendDescriptor(&d);
}
+
+ map->SetInObjectProperties(JSModuleNamespace::kInObjectFieldCount);
}
{ // -- I t e r a t o r R e s u l t
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698