Chromium Code Reviews| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 826 DCHECK_EQ(*isolate()->object_function(), *value); | 826 DCHECK_EQ(*isolate()->object_function(), *value); |
| 827 #endif | 827 #endif |
| 828 } else { | 828 } else { |
| 829 Handle<FunctionTemplateInfo> js_global_object_constructor( | 829 Handle<FunctionTemplateInfo> js_global_object_constructor( |
| 830 FunctionTemplateInfo::cast(js_global_object_template->constructor())); | 830 FunctionTemplateInfo::cast(js_global_object_template->constructor())); |
| 831 js_global_object_function = ApiNatives::CreateApiFunction( | 831 js_global_object_function = ApiNatives::CreateApiFunction( |
| 832 isolate(), js_global_object_constructor, factory()->the_hole_value(), | 832 isolate(), js_global_object_constructor, factory()->the_hole_value(), |
| 833 ApiNatives::GlobalObjectType); | 833 ApiNatives::GlobalObjectType); |
| 834 } | 834 } |
| 835 | 835 |
| 836 js_global_object_function->initial_map()->set_is_prototype_map(true); | |
|
Jakob Kummerow
2015/03/24 10:40:13
This makes it possible to DCHECK that we only ever
| |
| 836 js_global_object_function->initial_map()->set_is_hidden_prototype(); | 837 js_global_object_function->initial_map()->set_is_hidden_prototype(); |
| 837 js_global_object_function->initial_map()->set_dictionary_map(true); | 838 js_global_object_function->initial_map()->set_dictionary_map(true); |
| 838 Handle<GlobalObject> global_object = | 839 Handle<GlobalObject> global_object = |
| 839 factory()->NewGlobalObject(js_global_object_function); | 840 factory()->NewGlobalObject(js_global_object_function); |
| 840 | 841 |
| 841 // Step 2: (re)initialize the global proxy object. | 842 // Step 2: (re)initialize the global proxy object. |
| 842 Handle<JSFunction> global_proxy_function; | 843 Handle<JSFunction> global_proxy_function; |
| 843 if (global_proxy_template.IsEmpty()) { | 844 if (global_proxy_template.IsEmpty()) { |
| 844 Handle<String> name = Handle<String>(heap()->empty_string()); | 845 Handle<String> name = Handle<String>(heap()->empty_string()); |
| 845 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( | 846 Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin( |
| (...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2919 return from + sizeof(NestingCounterType); | 2920 return from + sizeof(NestingCounterType); |
| 2920 } | 2921 } |
| 2921 | 2922 |
| 2922 | 2923 |
| 2923 // Called when the top-level V8 mutex is destroyed. | 2924 // Called when the top-level V8 mutex is destroyed. |
| 2924 void Bootstrapper::FreeThreadResources() { | 2925 void Bootstrapper::FreeThreadResources() { |
| 2925 DCHECK(!IsActive()); | 2926 DCHECK(!IsActive()); |
| 2926 } | 2927 } |
| 2927 | 2928 |
| 2928 } } // namespace v8::internal | 2929 } } // namespace v8::internal |
| OLD | NEW |