| 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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 // Allocate the native context FixedArray first and then patch the | 812 // Allocate the native context FixedArray first and then patch the |
| 813 // closure and extension object later (we need the empty function | 813 // closure and extension object later (we need the empty function |
| 814 // and the global object, but in order to create those, we need the | 814 // and the global object, but in order to create those, we need the |
| 815 // native context). | 815 // native context). |
| 816 native_context_ = factory()->NewNativeContext(); | 816 native_context_ = factory()->NewNativeContext(); |
| 817 AddToWeakNativeContextList(*native_context()); | 817 AddToWeakNativeContextList(*native_context()); |
| 818 isolate()->set_context(*native_context()); | 818 isolate()->set_context(*native_context()); |
| 819 | 819 |
| 820 // Allocate the message listeners object. | 820 // Allocate the message listeners object. |
| 821 { | 821 { |
| 822 v8::NeanderArray listeners(isolate()); | 822 Handle<TemplateList> list = TemplateList::New(isolate(), 1); |
| 823 native_context()->set_message_listeners(*listeners.value()); | 823 native_context()->set_message_listeners(*list); |
| 824 } | 824 } |
| 825 } | 825 } |
| 826 | 826 |
| 827 | 827 |
| 828 void Genesis::InstallGlobalThisBinding() { | 828 void Genesis::InstallGlobalThisBinding() { |
| 829 Handle<ScriptContextTable> script_contexts( | 829 Handle<ScriptContextTable> script_contexts( |
| 830 native_context()->script_context_table()); | 830 native_context()->script_context_table()); |
| 831 Handle<ScopeInfo> scope_info = ScopeInfo::CreateGlobalThisBinding(isolate()); | 831 Handle<ScopeInfo> scope_info = ScopeInfo::CreateGlobalThisBinding(isolate()); |
| 832 Handle<JSFunction> closure(native_context()->closure()); | 832 Handle<JSFunction> closure(native_context()->closure()); |
| 833 Handle<Context> context = factory()->NewScriptContext(closure, scope_info); | 833 Handle<Context> context = factory()->NewScriptContext(closure, scope_info); |
| (...skipping 3224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4058 } | 4058 } |
| 4059 | 4059 |
| 4060 | 4060 |
| 4061 // Called when the top-level V8 mutex is destroyed. | 4061 // Called when the top-level V8 mutex is destroyed. |
| 4062 void Bootstrapper::FreeThreadResources() { | 4062 void Bootstrapper::FreeThreadResources() { |
| 4063 DCHECK(!IsActive()); | 4063 DCHECK(!IsActive()); |
| 4064 } | 4064 } |
| 4065 | 4065 |
| 4066 } // namespace internal | 4066 } // namespace internal |
| 4067 } // namespace v8 | 4067 } // namespace v8 |
| OLD | NEW |