Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Side by Side Diff: src/api.cc

Issue 2829223002: Add setter to Isolate for allowing Atomics.wait (Closed)
Patch Set: add test Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698