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. |