OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 8924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8935 isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds(visitor); | 8935 isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds(visitor); |
8936 } | 8936 } |
8937 | 8937 |
8938 | 8938 |
8939 void Isolate::VisitWeakHandles(PersistentHandleVisitor* visitor) { | 8939 void Isolate::VisitWeakHandles(PersistentHandleVisitor* visitor) { |
8940 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 8940 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
8941 i::DisallowHeapAllocation no_allocation; | 8941 i::DisallowHeapAllocation no_allocation; |
8942 isolate->global_handles()->IterateWeakRootsInNewSpaceWithClassIds(visitor); | 8942 isolate->global_handles()->IterateWeakRootsInNewSpaceWithClassIds(visitor); |
8943 } | 8943 } |
8944 | 8944 |
| 8945 void Isolate::SetAllowAtomicsWait(bool allow) { |
| 8946 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 8947 isolate->set_allow_atomics_wait(allow); |
| 8948 } |
8945 | 8949 |
8946 MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type) | 8950 MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type) |
8947 : isolate_(reinterpret_cast<i::Isolate*>(isolate)), | 8951 : isolate_(reinterpret_cast<i::Isolate*>(isolate)), |
8948 run_(type == MicrotasksScope::kRunMicrotasks) { | 8952 run_(type == MicrotasksScope::kRunMicrotasks) { |
8949 auto handle_scope_implementer = isolate_->handle_scope_implementer(); | 8953 auto handle_scope_implementer = isolate_->handle_scope_implementer(); |
8950 if (run_) handle_scope_implementer->IncrementMicrotasksScopeDepth(); | 8954 if (run_) handle_scope_implementer->IncrementMicrotasksScopeDepth(); |
8951 #ifdef DEBUG | 8955 #ifdef DEBUG |
8952 if (!run_) handle_scope_implementer->IncrementDebugMicrotasksScopeDepth(); | 8956 if (!run_) handle_scope_implementer->IncrementDebugMicrotasksScopeDepth(); |
8953 #endif | 8957 #endif |
8954 } | 8958 } |
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10463 Address callback_address = | 10467 Address callback_address = |
10464 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 10468 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
10465 VMState<EXTERNAL> state(isolate); | 10469 VMState<EXTERNAL> state(isolate); |
10466 ExternalCallbackScope call_scope(isolate, callback_address); | 10470 ExternalCallbackScope call_scope(isolate, callback_address); |
10467 callback(info); | 10471 callback(info); |
10468 } | 10472 } |
10469 | 10473 |
10470 | 10474 |
10471 } // namespace internal | 10475 } // namespace internal |
10472 } // namespace v8 | 10476 } // namespace v8 |
OLD | NEW |