| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index af71a313fd4b573318df2360fbdd201c05d70386..633859d384d140b57adcc5d72e4e16d18b11751a 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -476,7 +476,8 @@ int CodeAndMetadataSize(CompilationInfo* info) {
|
| bool GenerateUnoptimizedCode(CompilationInfo* info) {
|
| bool success;
|
| EnsureFeedbackMetadata(info);
|
| - if (FLAG_validate_asm && info->scope()->asm_module()) {
|
| + if (FLAG_validate_asm && info->scope()->asm_module() &&
|
| + !info->shared_info()->is_asm_wasm_broken()) {
|
| MaybeHandle<FixedArray> wasm_data;
|
| wasm_data = AsmJs::ConvertAsmToWasm(info->parse_info());
|
| if (!wasm_data.is_null()) {
|
| @@ -1432,7 +1433,9 @@ bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
|
| // TODO(4280): For now we play it safe and remove the bytecode array when we
|
| // switch to baseline code. We might consider keeping around the bytecode so
|
| // that it can be used as the "source of truth" eventually.
|
| - if (!FLAG_ignition_preserve_bytecode) shared->ClearBytecodeArray();
|
| + if (shared->HasBytecodeArray()) {
|
| + if (!FLAG_ignition_preserve_bytecode) shared->ClearBytecodeArray();
|
| + }
|
|
|
| // The scope info might not have been set if a lazily compiled
|
| // function is inlined before being called for the first time.
|
|
|