Chromium Code Reviews| Index: src/messages.cc |
| diff --git a/src/messages.cc b/src/messages.cc |
| index 6e7c495643aa55816300fed8141a009937ac3e23..1f7586c04d69aa36adbee7794f8bb3fae8eb9cb4 100644 |
| --- a/src/messages.cc |
| +++ b/src/messages.cc |
| @@ -205,12 +205,12 @@ Handle<Object> CallSite::GetFileName() { |
| Handle<Object> CallSite::GetFunctionName() { |
| if (IsWasm()) { |
| - if (wasm_obj_->IsUndefined()) return isolate_->factory()->null_value(); |
| - // wasm_obj_ can be a String if we generate WASM code directly in a test |
| - // case. |
| - if (wasm_obj_->IsString()) return wasm_obj_; |
| - return wasm::GetWasmFunctionName(Handle<JSObject>::cast(wasm_obj_), |
| - wasm_func_index_); |
| + MaybeHandle<String> name; |
| + if (!wasm_obj_->IsUndefined()) |
|
Yang
2016/05/18 13:38:48
brackets around the if-body.
Clemens Hammacher
2016/05/18 17:44:07
Done.
|
| + name = wasm::GetWasmFunctionName(Handle<JSObject>::cast(wasm_obj_), |
| + wasm_func_index_); |
| + if (name.is_null()) return isolate_->factory()->null_value(); |
| + return name.ToHandleChecked(); |
| } |
| Handle<String> result = JSFunction::GetName(fun_); |
| if (result->length() != 0) return result; |