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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1909353002: [wasm] Make wasm info available on the stack trace (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-offset-table-3
Patch Set: rebase Created 4 years, 8 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 | src/frames.h » ('j') | src/frames.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 3e4a2a77864e7e8431159a3ea53067b1e8249689..15dab06f6958aa071e642591be68f85d8b0e5265 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -3051,13 +3051,16 @@ 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()));
+ } else {
+ base::SmartArrayPointer<char> debug_name = info_.GetDebugName();
+ MaybeHandle<String> maybe_name;
+ if (debug_name.get() != nullptr)
+ maybe_name = isolate_->factory()->NewStringFromUtf8(
Yang 2016/05/03 18:59:07 Can we have brackets around if-body here and below
Clemens Hammacher 2016/05/04 09:06:19 It turned out the first if is even redundant, so I
+ 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);
« no previous file with comments | « no previous file | src/frames.h » ('j') | src/frames.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698