Commit 544bd08c authored by clemensh's avatar clemensh Committed by Commit bot

[wasm] Remove another unnecessary undefined-instance check

BUG=v8:5620
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2620973002
Cr-Commit-Position: refs/heads/master@{#42172}
parent 099abc58
......@@ -1529,15 +1529,10 @@ void WasmFrame::Print(StringStream* accumulator, PrintMode mode,
Script* script = this->script();
accumulator->PrintName(script->name());
int pc = static_cast<int>(this->pc() - LookupCode()->instruction_start());
Vector<const uint8_t> raw_func_name;
Object* instance_or_undef = this->wasm_instance();
if (instance_or_undef->IsUndefined(this->isolate())) {
raw_func_name = STATIC_CHAR_VECTOR("<undefined>");
} else {
raw_func_name = WasmInstanceObject::cast(instance_or_undef)
->compiled_module()
->GetRawFunctionName(this->function_index());
}
Object* instance = this->wasm_instance();
Vector<const uint8_t> raw_func_name =
WasmInstanceObject::cast(instance)->compiled_module()->GetRawFunctionName(
this->function_index());
const int kMaxPrintedFunctionName = 64;
char func_name[kMaxPrintedFunctionName + 1];
int func_name_len = std::min(kMaxPrintedFunctionName, raw_func_name.length());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment