| 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 native_context()->set_script_context_table(*new_script_contexts); | 830 native_context()->set_script_context_table(*new_script_contexts); |
| 831 } | 831 } |
| 832 | 832 |
| 833 | 833 |
| 834 void Genesis::HookUpGlobalThisBinding(Handle<FixedArray> outdated_contexts) { | 834 void Genesis::HookUpGlobalThisBinding(Handle<FixedArray> outdated_contexts) { |
| 835 // One of these contexts should be the one that declares the global "this" | 835 // One of these contexts should be the one that declares the global "this" |
| 836 // binding. | 836 // binding. |
| 837 for (int i = 0; i < outdated_contexts->length(); ++i) { | 837 for (int i = 0; i < outdated_contexts->length(); ++i) { |
| 838 Context* context = Context::cast(outdated_contexts->get(i)); | 838 Context* context = Context::cast(outdated_contexts->get(i)); |
| 839 if (context->IsScriptContext()) { | 839 if (context->IsScriptContext()) { |
| 840 ScopeInfo* scope_info = ScopeInfo::cast(context->extension()); | 840 ScopeInfo* scope_info = context->scope_info(); |
| 841 int slot = scope_info->ReceiverContextSlotIndex(); | 841 int slot = scope_info->ReceiverContextSlotIndex(); |
| 842 if (slot >= 0) { | 842 if (slot >= 0) { |
| 843 DCHECK_EQ(slot, Context::MIN_CONTEXT_SLOTS); | 843 DCHECK_EQ(slot, Context::MIN_CONTEXT_SLOTS); |
| 844 context->set(slot, native_context()->global_proxy()); | 844 context->set(slot, native_context()->global_proxy()); |
| 845 } | 845 } |
| 846 } | 846 } |
| 847 } | 847 } |
| 848 } | 848 } |
| 849 | 849 |
| 850 | 850 |
| (...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3269 } | 3269 } |
| 3270 | 3270 |
| 3271 | 3271 |
| 3272 // Called when the top-level V8 mutex is destroyed. | 3272 // Called when the top-level V8 mutex is destroyed. |
| 3273 void Bootstrapper::FreeThreadResources() { | 3273 void Bootstrapper::FreeThreadResources() { |
| 3274 DCHECK(!IsActive()); | 3274 DCHECK(!IsActive()); |
| 3275 } | 3275 } |
| 3276 | 3276 |
| 3277 } // namespace internal | 3277 } // namespace internal |
| 3278 } // namespace v8 | 3278 } // namespace v8 |
| OLD | NEW |