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/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 native_context()->set_script_context_table(*new_script_contexts); | 836 native_context()->set_script_context_table(*new_script_contexts); |
837 } | 837 } |
838 | 838 |
839 | 839 |
840 void Genesis::HookUpGlobalThisBinding(Handle<FixedArray> outdated_contexts) { | 840 void Genesis::HookUpGlobalThisBinding(Handle<FixedArray> outdated_contexts) { |
841 // One of these contexts should be the one that declares the global "this" | 841 // One of these contexts should be the one that declares the global "this" |
842 // binding. | 842 // binding. |
843 for (int i = 0; i < outdated_contexts->length(); ++i) { | 843 for (int i = 0; i < outdated_contexts->length(); ++i) { |
844 Context* context = Context::cast(outdated_contexts->get(i)); | 844 Context* context = Context::cast(outdated_contexts->get(i)); |
845 if (context->IsScriptContext()) { | 845 if (context->IsScriptContext()) { |
846 ScopeInfo* scope_info = ScopeInfo::cast(context->extension()); | 846 ScopeInfo* scope_info = context->scope_info(); |
847 int slot = scope_info->ReceiverContextSlotIndex(); | 847 int slot = scope_info->ReceiverContextSlotIndex(); |
848 if (slot >= 0) { | 848 if (slot >= 0) { |
849 DCHECK_EQ(slot, Context::MIN_CONTEXT_SLOTS); | 849 DCHECK_EQ(slot, Context::MIN_CONTEXT_SLOTS); |
850 context->set(slot, native_context()->global_proxy()); | 850 context->set(slot, native_context()->global_proxy()); |
851 } | 851 } |
852 } | 852 } |
853 } | 853 } |
854 } | 854 } |
855 | 855 |
856 | 856 |
(...skipping 2457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3314 } | 3314 } |
3315 | 3315 |
3316 | 3316 |
3317 // Called when the top-level V8 mutex is destroyed. | 3317 // Called when the top-level V8 mutex is destroyed. |
3318 void Bootstrapper::FreeThreadResources() { | 3318 void Bootstrapper::FreeThreadResources() { |
3319 DCHECK(!IsActive()); | 3319 DCHECK(!IsActive()); |
3320 } | 3320 } |
3321 | 3321 |
3322 } // namespace internal | 3322 } // namespace internal |
3323 } // namespace v8 | 3323 } // namespace v8 |
OLD | NEW |