| 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 3131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3142 Handle<JSFunction> empty_function = CreateEmptyFunction(isolate); | 3142 Handle<JSFunction> empty_function = CreateEmptyFunction(isolate); |
| 3143 CreateStrictModeFunctionMaps(empty_function); | 3143 CreateStrictModeFunctionMaps(empty_function); |
| 3144 CreateStrongModeFunctionMaps(empty_function); | 3144 CreateStrongModeFunctionMaps(empty_function); |
| 3145 CreateIteratorMaps(); | 3145 CreateIteratorMaps(); |
| 3146 Handle<JSGlobalObject> global_object = | 3146 Handle<JSGlobalObject> global_object = |
| 3147 CreateNewGlobals(global_proxy_template, global_proxy); | 3147 CreateNewGlobals(global_proxy_template, global_proxy); |
| 3148 HookUpGlobalProxy(global_object, global_proxy); | 3148 HookUpGlobalProxy(global_object, global_proxy); |
| 3149 InitializeGlobal(global_object, empty_function, context_type); | 3149 InitializeGlobal(global_object, empty_function, context_type); |
| 3150 InitializeNormalizedMapCaches(); | 3150 InitializeNormalizedMapCaches(); |
| 3151 | 3151 |
| 3152 // TODO(yangguo): Find a way to prevent accidentially installing properties | |
| 3153 // on the global object. | |
| 3154 if (!InstallNatives(context_type)) return; | 3152 if (!InstallNatives(context_type)) return; |
| 3155 | 3153 |
| 3156 MakeFunctionInstancePrototypeWritable(); | 3154 MakeFunctionInstancePrototypeWritable(); |
| 3157 | 3155 |
| 3158 if (context_type != THIN_CONTEXT) { | 3156 if (context_type != THIN_CONTEXT) { |
| 3159 if (!InstallExtraNatives()) return; | 3157 if (!InstallExtraNatives()) return; |
| 3160 if (!ConfigureGlobalObjects(global_proxy_template)) return; | 3158 if (!ConfigureGlobalObjects(global_proxy_template)) return; |
| 3161 } | 3159 } |
| 3162 isolate->counters()->contexts_created_from_scratch()->Increment(); | 3160 isolate->counters()->contexts_created_from_scratch()->Increment(); |
| 3163 // Re-initialize the counter because it got incremented during snapshot | 3161 // Re-initialize the counter because it got incremented during snapshot |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3220 } | 3218 } |
| 3221 | 3219 |
| 3222 | 3220 |
| 3223 // Called when the top-level V8 mutex is destroyed. | 3221 // Called when the top-level V8 mutex is destroyed. |
| 3224 void Bootstrapper::FreeThreadResources() { | 3222 void Bootstrapper::FreeThreadResources() { |
| 3225 DCHECK(!IsActive()); | 3223 DCHECK(!IsActive()); |
| 3226 } | 3224 } |
| 3227 | 3225 |
| 3228 } // namespace internal | 3226 } // namespace internal |
| 3229 } // namespace v8 | 3227 } // namespace v8 |
| OLD | NEW |