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

Unified Diff: src/factory.cc

Issue 2631223002: [modules] Fix NewJSModuleNamespace to avoid GC being able to see incomplete JSModuleNamespace. (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/heap-symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 0e34a72754a49f5aabbe915cb20aa296feae3565..a2742d7defbbb808dde46224ab193c26c32f1731 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1853,8 +1853,8 @@ Handle<JSModuleNamespace> Factory::NewJSModuleNamespace() {
Handle<JSModuleNamespace>::cast(NewJSObjectFromMap(map)));
FieldIndex index = FieldIndex::ForDescriptor(
*map, JSModuleNamespace::kToStringTagFieldIndex);
- Handle<String> to_string_value = NewStringFromAsciiChecked("Module");
- module_namespace->FastPropertyAtPut(index, *to_string_value);
+ module_namespace->FastPropertyAtPut(index,
+ isolate()->heap()->Module_string());
return module_namespace;
}
« no previous file with comments | « no previous file | src/heap-symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698