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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
941 Handle<Object> value = Object::GetProperty(&it).ToHandleChecked(); | 941 Handle<Object> value = Object::GetProperty(&it).ToHandleChecked(); |
942 DCHECK(it.IsFound()); | 942 DCHECK(it.IsFound()); |
943 DCHECK_EQ(*isolate()->object_function(), *value); | 943 DCHECK_EQ(*isolate()->object_function(), *value); |
944 #endif | 944 #endif |
945 } else { | 945 } else { |
946 Handle<FunctionTemplateInfo> js_global_object_constructor( | 946 Handle<FunctionTemplateInfo> js_global_object_constructor( |
947 FunctionTemplateInfo::cast(js_global_object_template->constructor())); | 947 FunctionTemplateInfo::cast(js_global_object_template->constructor())); |
948 js_global_object_function = ApiNatives::CreateApiFunction( | 948 js_global_object_function = ApiNatives::CreateApiFunction( |
949 isolate(), js_global_object_constructor, factory()->the_hole_value(), | 949 isolate(), js_global_object_constructor, factory()->the_hole_value(), |
950 ApiNatives::GlobalObjectType); | 950 ApiNatives::GlobalObjectType); |
951 if (js_global_object_template->immutable_proto()) | |
adamk
2016/11/04 17:39:19
I think you can do this check inside ApiNatives::C
Dan Ehrenberg
2016/11/04 17:56:36
Done
| |
952 js_global_object_function->initial_map()->set_immutable_proto(true); | |
951 } | 953 } |
952 | 954 |
953 js_global_object_function->initial_map()->set_is_prototype_map(true); | 955 js_global_object_function->initial_map()->set_is_prototype_map(true); |
954 js_global_object_function->initial_map()->set_dictionary_map(true); | 956 js_global_object_function->initial_map()->set_dictionary_map(true); |
955 Handle<JSGlobalObject> global_object = | 957 Handle<JSGlobalObject> global_object = |
956 factory()->NewJSGlobalObject(js_global_object_function); | 958 factory()->NewJSGlobalObject(js_global_object_function); |
957 | 959 |
958 // Step 2: (re)initialize the global proxy object. | 960 // Step 2: (re)initialize the global proxy object. |
959 Handle<JSFunction> global_proxy_function; | 961 Handle<JSFunction> global_proxy_function; |
960 if (global_proxy_template.IsEmpty()) { | 962 if (global_proxy_template.IsEmpty()) { |
(...skipping 3582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4543 } | 4545 } |
4544 | 4546 |
4545 | 4547 |
4546 // Called when the top-level V8 mutex is destroyed. | 4548 // Called when the top-level V8 mutex is destroyed. |
4547 void Bootstrapper::FreeThreadResources() { | 4549 void Bootstrapper::FreeThreadResources() { |
4548 DCHECK(!IsActive()); | 4550 DCHECK(!IsActive()); |
4549 } | 4551 } |
4550 | 4552 |
4551 } // namespace internal | 4553 } // namespace internal |
4552 } // namespace v8 | 4554 } // namespace v8 |
OLD | NEW |