Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: src/frames.cc

Issue 2620973002: [wasm] Remove another unnecessary undefined-instance check (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index c0d0e896ca358e8c9b01995368135dffda385e36..9e7cbc80541cda9fb8a468df4d3b61268feed35f 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698