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

Side by Side Diff: src/bootstrapper.cc

Issue 2663303003: Store correct String.prototype map on the context (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 4698 matching lines...) Expand 10 before | Expand all | Expand 10 after
4709 // snapshot as we should be able to turn them off at runtime. Re-installing 4709 // snapshot as we should be able to turn them off at runtime. Re-installing
4710 // them after they have already been deserialized would also fail. 4710 // them after they have already been deserialized would also fail.
4711 if (context_type == FULL_CONTEXT) { 4711 if (context_type == FULL_CONTEXT) {
4712 if (!isolate->serializer_enabled()) { 4712 if (!isolate->serializer_enabled()) {
4713 InitializeExperimentalGlobal(); 4713 InitializeExperimentalGlobal();
4714 if (!InstallExperimentalNatives()) return; 4714 if (!InstallExperimentalNatives()) return;
4715 4715
4716 if (FLAG_experimental_extras) { 4716 if (FLAG_experimental_extras) {
4717 if (!InstallExperimentalExtraNatives()) return; 4717 if (!InstallExperimentalExtraNatives()) return;
4718 } 4718 }
4719
4720 // Store String.prototype's map again in case it has been changed by
4721 // experimental natives.
4722 Handle<JSFunction> string_function(native_context()->string_function());
4723 JSObject* string_function_prototype =
4724 JSObject::cast(string_function->initial_map()->prototype());
4725 DCHECK(string_function_prototype->HasFastProperties());
4726 native_context()->set_string_function_prototype_map(
4727 string_function_prototype->map());
4719 } 4728 }
4720 // The serializer cannot serialize typed arrays. Reset those typed arrays 4729 // The serializer cannot serialize typed arrays. Reset those typed arrays
4721 // for each new context. 4730 // for each new context.
4722 } else if (context_type == DEBUG_CONTEXT) { 4731 } else if (context_type == DEBUG_CONTEXT) {
4723 DCHECK(!isolate->serializer_enabled()); 4732 DCHECK(!isolate->serializer_enabled());
4724 InitializeExperimentalGlobal(); 4733 InitializeExperimentalGlobal();
4725 if (!InstallDebuggerNatives()) return; 4734 if (!InstallDebuggerNatives()) return;
4726 } 4735 }
4727 4736
4728 ConfigureUtilsObject(context_type); 4737 ConfigureUtilsObject(context_type);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
4824 } 4833 }
4825 4834
4826 4835
4827 // Called when the top-level V8 mutex is destroyed. 4836 // Called when the top-level V8 mutex is destroyed.
4828 void Bootstrapper::FreeThreadResources() { 4837 void Bootstrapper::FreeThreadResources() {
4829 DCHECK(!IsActive()); 4838 DCHECK(!IsActive());
4830 } 4839 }
4831 4840
4832 } // namespace internal 4841 } // namespace internal
4833 } // namespace v8 4842 } // namespace v8
OLDNEW
« 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