We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4de495f commit 572619bCopy full SHA for 572619b
runtime/vm/compiler_test.cc
@@ -6,6 +6,7 @@
6
#include "platform/assert.h"
7
#include "vm/class_finalizer.h"
8
#include "vm/code_patcher.h"
9
+#include "vm/compiler/frontend/bytecode_reader.h"
10
#include "vm/dart_api_impl.h"
11
#include "vm/heap/safepoint.h"
12
#include "vm/kernel_isolate.h"
@@ -124,6 +125,9 @@ ISOLATE_UNIT_TEST_CASE(CompileFunctionOnHelperThread) {
124
125
EXPECT(func.HasCode());
126
return;
127
}
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);
131
#if !defined(PRODUCT)
132
// Constant in product mode.
133
FLAG_background_compilation = true;
0 commit comments