Skip to content

Commit 572619b

Browse files
rmacnak-googlecommit-bot@chromium.org
authored andcommitted
[vm, bytecode] Fix vm/cc/CompileFunctionOnHelperThread.
Change-Id: I9358bef937642fdadce3922b7c481b3780f9f623 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107685 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Régis Crelier <[email protected]> Reviewed-by: Alexander Markov <[email protected]>
1 parent 4de495f commit 572619b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

runtime/vm/compiler_test.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "platform/assert.h"
77
#include "vm/class_finalizer.h"
88
#include "vm/code_patcher.h"
9+
#include "vm/compiler/frontend/bytecode_reader.h"
910
#include "vm/dart_api_impl.h"
1011
#include "vm/heap/safepoint.h"
1112
#include "vm/kernel_isolate.h"
@@ -124,6 +125,9 @@ ISOLATE_UNIT_TEST_CASE(CompileFunctionOnHelperThread) {
124125
EXPECT(func.HasCode());
125126
return;
126127
}
128+
// Bytecode loading must happen on the main thread. Ensure the bytecode is
129+
// loaded before asking for an unoptimized compile on a background thread.
130+
kernel::BytecodeReader::ReadFunctionBytecode(thread, func);
127131
#if !defined(PRODUCT)
128132
// Constant in product mode.
129133
FLAG_background_compilation = true;

0 commit comments

Comments
 (0)