| Index: src/compiler/wasm-compiler.cc
|
| diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
|
| index 96557b8386b17eb98318e7682503f2d6c16315a9..fda937196b308ec1aa292b14f9b31704d8480c36 100644
|
| --- a/src/compiler/wasm-compiler.cc
|
| +++ b/src/compiler/wasm-compiler.cc
|
| @@ -3014,13 +3014,15 @@ class WasmCompilationUnit {
|
| isolate_->factory()->NewFixedArray(2, TENURED);
|
| if (!module_env_->instance->js_object.is_null()) {
|
| deopt_data->set(0, *module_env_->instance->js_object);
|
| - deopt_data->set(1, Smi::FromInt(function_->func_index));
|
| - } else if (info_.GetDebugName().get() != nullptr) {
|
| - MaybeHandle<String> maybe_name = isolate_->factory()->NewStringFromUtf8(
|
| - CStrVector(info_.GetDebugName().get()));
|
| - if (!maybe_name.is_null())
|
| + } else {
|
| + base::SmartArrayPointer<char> debug_name = info_.GetDebugName();
|
| + MaybeHandle<String> maybe_name =
|
| + isolate_->factory()->NewStringFromUtf8(CStrVector(debug_name.get()));
|
| + if (!maybe_name.is_null()) {
|
| deopt_data->set(0, *maybe_name.ToHandleChecked());
|
| + }
|
| }
|
| + deopt_data->set(1, Smi::FromInt(function_->func_index));
|
| deopt_data->set_length(2);
|
| code->set_deoptimization_data(*deopt_data);
|
|
|
|
|