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

Unified Diff: src/bootstrapper.cc

Issue 2663303003: Store correct String.prototype map on the context (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 | test/cctest/heap/test-heap.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 402eb1a7fc72c7303faa79979ece12fe66ccc6df..ed6c37fb488a005a91ba4994c4735bdbf6a8c33d 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -4716,6 +4716,15 @@ Genesis::Genesis(
if (FLAG_experimental_extras) {
if (!InstallExperimentalExtraNatives()) return;
}
+
+ // Store String.prototype's map again in case it has been changed by
+ // experimental natives.
+ Handle<JSFunction> string_function(native_context()->string_function());
+ JSObject* string_function_prototype =
+ JSObject::cast(string_function->initial_map()->prototype());
+ DCHECK(string_function_prototype->HasFastProperties());
+ native_context()->set_string_function_prototype_map(
+ string_function_prototype->map());
}
// The serializer cannot serialize typed arrays. Reset those typed arrays
// for each new context.
« no previous file with comments | « no previous file | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698