[wasm] Fix generated function name when logging code.

R=herhut@chromium.org

Change-Id: Ic7fede18b89a14a8e0af255add5678a70b699475
Reviewed-on: https://chromium-review.googlesource.com/c/1319580
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57277}
This commit is contained in:
Michael Starzinger 2018-11-06 11:14:57 +01:00 committed by Commit Bot
parent 62a8054d9b
commit 73361422be

View File

@ -169,7 +169,8 @@ void WasmCode::LogCode(Isolate* isolate) const {
{cname.get(), static_cast<size_t>(name_length)}));
} else {
EmbeddedVector<char, 32> generated_name;
SNPrintF(generated_name, "wasm-function[%d]", index());
int length = SNPrintF(generated_name, "wasm-function[%d]", index());
generated_name.Truncate(length);
PROFILE(isolate, CodeCreateEvent(CodeEventListener::FUNCTION_TAG, this,
generated_name));
}