[handles] Check FLAG_local_heaps in IsDereferenceAllowed()
While LocalHeap allow to dereference handles on background threads, this is only possible when FLAG_local_heaps is enabled. Bug: v8:10315 Change-Id: Ia27582cda7e4b4faf4d2c76959de418415e1ae68 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2372147 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69557}
This commit is contained in:
parent
289c15eb6d
commit
2c879c68c5
@ -43,7 +43,7 @@ bool HandleBase::IsDereferenceAllowed() const {
|
||||
}
|
||||
|
||||
LocalHeap* local_heap = LocalHeap::Current();
|
||||
if (V8_UNLIKELY(local_heap)) {
|
||||
if (FLAG_local_heaps && local_heap) {
|
||||
// Local heap can't access handles when parked
|
||||
if (!local_heap->IsHandleDereferenceAllowed()) return false;
|
||||
|
||||
|
@ -31,6 +31,7 @@ SerializerTester::SerializerTester(const char* source)
|
||||
// We need allocation of executable memory for the compilation.
|
||||
FLAG_jitless = false;
|
||||
FLAG_allow_natives_syntax = true;
|
||||
FlagList::EnforceFlagImplications();
|
||||
|
||||
std::string function_string = "(function() { ";
|
||||
function_string += source;
|
||||
|
Loading…
Reference in New Issue
Block a user