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/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 2873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2884 InstallJSFunctionResultCaches(); | 2884 InstallJSFunctionResultCaches(); |
2885 InitializeNormalizedMapCaches(); | 2885 InitializeNormalizedMapCaches(); |
2886 if (!InstallNatives()) return; | 2886 if (!InstallNatives()) return; |
2887 | 2887 |
2888 MakeFunctionInstancePrototypeWritable(); | 2888 MakeFunctionInstancePrototypeWritable(); |
2889 | 2889 |
2890 if (!ConfigureGlobalObjects(global_proxy_template)) return; | 2890 if (!ConfigureGlobalObjects(global_proxy_template)) return; |
2891 isolate->counters()->contexts_created_from_scratch()->Increment(); | 2891 isolate->counters()->contexts_created_from_scratch()->Increment(); |
2892 } | 2892 } |
2893 | 2893 |
2894 // Install experimental natives. | 2894 // Install experimental natives. Do not include them into the snapshot as we |
2895 if (!InstallExperimentalNatives()) return; | 2895 // should be able to turn them off at runtime. Re-installing them after |
2896 InitializeExperimentalGlobal(); | 2896 // they have already been deserialized would also fail. |
| 2897 if (!isolate->serializer_enabled()) { |
| 2898 if (!InstallExperimentalNatives()) return; |
| 2899 InitializeExperimentalGlobal(); |
| 2900 } |
2897 | 2901 |
2898 // The serializer cannot serialize typed arrays. Reset those typed arrays | 2902 // The serializer cannot serialize typed arrays. Reset those typed arrays |
2899 // for each new context. | 2903 // for each new context. |
2900 InitializeBuiltinTypedArrays(); | 2904 InitializeBuiltinTypedArrays(); |
2901 | 2905 |
2902 result_ = native_context(); | 2906 result_ = native_context(); |
2903 } | 2907 } |
2904 | 2908 |
2905 | 2909 |
2906 // Support for thread preemption. | 2910 // Support for thread preemption. |
(...skipping 18 matching lines...) Expand all Loading... |
2925 return from + sizeof(NestingCounterType); | 2929 return from + sizeof(NestingCounterType); |
2926 } | 2930 } |
2927 | 2931 |
2928 | 2932 |
2929 // Called when the top-level V8 mutex is destroyed. | 2933 // Called when the top-level V8 mutex is destroyed. |
2930 void Bootstrapper::FreeThreadResources() { | 2934 void Bootstrapper::FreeThreadResources() { |
2931 DCHECK(!IsActive()); | 2935 DCHECK(!IsActive()); |
2932 } | 2936 } |
2933 | 2937 |
2934 } } // namespace v8::internal | 2938 } } // namespace v8::internal |
OLD | NEW |