| 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 { // NOLINT | 783 { // NOLINT |
| 784 DCHECK(context->get(Context::NEXT_CONTEXT_LINK)->IsUndefined()); | 784 DCHECK(context->get(Context::NEXT_CONTEXT_LINK)->IsUndefined()); |
| 785 // Check that context is not in the list yet. | 785 // Check that context is not in the list yet. |
| 786 for (Object* current = heap->native_contexts_list(); | 786 for (Object* current = heap->native_contexts_list(); |
| 787 !current->IsUndefined(); | 787 !current->IsUndefined(); |
| 788 current = Context::cast(current)->get(Context::NEXT_CONTEXT_LINK)) { | 788 current = Context::cast(current)->get(Context::NEXT_CONTEXT_LINK)) { |
| 789 DCHECK(current != context); | 789 DCHECK(current != context); |
| 790 } | 790 } |
| 791 } | 791 } |
| 792 #endif | 792 #endif |
| 793 context->set(Context::NEXT_CONTEXT_LINK, heap->native_contexts_list()); | 793 context->set(Context::NEXT_CONTEXT_LINK, heap->native_contexts_list(), |
| 794 UPDATE_WEAK_WRITE_BARRIER); |
| 794 heap->set_native_contexts_list(context); | 795 heap->set_native_contexts_list(context); |
| 795 } | 796 } |
| 796 | 797 |
| 797 | 798 |
| 798 void Genesis::CreateRoots() { | 799 void Genesis::CreateRoots() { |
| 799 // Allocate the native context FixedArray first and then patch the | 800 // Allocate the native context FixedArray first and then patch the |
| 800 // closure and extension object later (we need the empty function | 801 // closure and extension object later (we need the empty function |
| 801 // and the global object, but in order to create those, we need the | 802 // and the global object, but in order to create those, we need the |
| 802 // native context). | 803 // native context). |
| 803 native_context_ = factory()->NewNativeContext(); | 804 native_context_ = factory()->NewNativeContext(); |
| (...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 return from + sizeof(NestingCounterType); | 3082 return from + sizeof(NestingCounterType); |
| 3082 } | 3083 } |
| 3083 | 3084 |
| 3084 | 3085 |
| 3085 // Called when the top-level V8 mutex is destroyed. | 3086 // Called when the top-level V8 mutex is destroyed. |
| 3086 void Bootstrapper::FreeThreadResources() { | 3087 void Bootstrapper::FreeThreadResources() { |
| 3087 DCHECK(!IsActive()); | 3088 DCHECK(!IsActive()); |
| 3088 } | 3089 } |
| 3089 | 3090 |
| 3090 } } // namespace v8::internal | 3091 } } // namespace v8::internal |
| OLD | NEW |