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

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

Issue 2590833002: [wasm] Only SNPrintF the function index if a name was not supplied. (Closed)
Patch Set: Created 4 years 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/wasm/wasm-objects.cc
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc
index f2d614e0f7e784f0f61bab598f6bd6c8e77f5b75..1e9fc8c9c7d4c3763265699a836b1428d470c145 100644
--- a/src/wasm/wasm-objects.cc
+++ b/src/wasm/wasm-objects.cc
@@ -312,10 +312,10 @@ Handle<WasmExportedFunction> WasmExportedFunction::New(
Isolate* isolate, Handle<WasmInstanceObject> instance,
MaybeHandle<String> maybe_name, int func_index, int arity,
Handle<Code> export_wrapper) {
- ScopedVector<char> buffer(16);
- int length = SNPrintF(buffer, "%d", func_index);
Handle<String> name;
if (maybe_name.is_null()) {
+ ScopedVector<char> buffer(16);
Clemens Hammacher 2016/12/20 11:25:54 We should make this an EmbeddedVector<char, 16>, s
+ int length = SNPrintF(buffer, "%d", func_index);
name = isolate->factory()
->NewStringFromAscii(
Vector<const char>::cast(buffer.SubVector(0, 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