 Chromium Code Reviews
 Chromium Code Reviews Issue 978813002:
  Serializer: still install experimental globals when creating a snapshot.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 978813002:
  Serializer: still install experimental globals when creating a snapshot.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| 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 2877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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. Do not include them into the snapshot as we | 2894 // Install experimental natives. Do not include them into the snapshot as we | 
| 2895 // should be able to turn them off at runtime. Re-installing them after | 2895 // should be able to turn them off at runtime. Re-installing them after | 
| 2896 // they have already been deserialized would also fail. | 2896 // they have already been deserialized would also fail. | 
| 2897 if (!isolate->serializer_enabled()) { | 2897 if (!isolate->serializer_enabled()) { | 
| 2898 if (!InstallExperimentalNatives()) return; | 2898 if (!InstallExperimentalNatives()) return; | 
| 
vogelheim
2015/03/04 14:37:34
super nitpick: I think I'd find 1x if with &&-ed c
 
Yang
2015/03/04 14:41:04
Done.
 | |
| 2899 InitializeExperimentalGlobal(); | |
| 2900 } | 2899 } | 
| 2901 | 2900 | 
| 2901 InitializeExperimentalGlobal(); | |
| 2902 | |
| 2902 // The serializer cannot serialize typed arrays. Reset those typed arrays | 2903 // The serializer cannot serialize typed arrays. Reset those typed arrays | 
| 2903 // for each new context. | 2904 // for each new context. | 
| 2904 InitializeBuiltinTypedArrays(); | 2905 InitializeBuiltinTypedArrays(); | 
| 2905 | 2906 | 
| 2906 result_ = native_context(); | 2907 result_ = native_context(); | 
| 2907 } | 2908 } | 
| 2908 | 2909 | 
| 2909 | 2910 | 
| 2910 // Support for thread preemption. | 2911 // Support for thread preemption. | 
| 2911 | 2912 | 
| (...skipping 17 matching lines...) Expand all Loading... | |
| 2929 return from + sizeof(NestingCounterType); | 2930 return from + sizeof(NestingCounterType); | 
| 2930 } | 2931 } | 
| 2931 | 2932 | 
| 2932 | 2933 | 
| 2933 // Called when the top-level V8 mutex is destroyed. | 2934 // Called when the top-level V8 mutex is destroyed. | 
| 2934 void Bootstrapper::FreeThreadResources() { | 2935 void Bootstrapper::FreeThreadResources() { | 
| 2935 DCHECK(!IsActive()); | 2936 DCHECK(!IsActive()); | 
| 2936 } | 2937 } | 
| 2937 | 2938 | 
| 2938 } } // namespace v8::internal | 2939 } } // namespace v8::internal | 
| OLD | NEW |