OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |