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

Unified Diff: src/wasm/wasm-function-name-table.h

Issue 1970503004: [wasm] Differentiate unnamed and empty names (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@add-utf8-check
Patch Set: Yang's last comments Created 4 years, 7 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 | « src/runtime/runtime-function.cc ('k') | src/wasm/wasm-function-name-table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-function-name-table.h
diff --git a/src/wasm/wasm-function-name-table.h b/src/wasm/wasm-function-name-table.h
index 1a713723f861b905cc52a134a357cc1578c2822f..755e225b25b0162dca19660501aec10cc17d7a6d 100644
--- a/src/wasm/wasm-function-name-table.h
+++ b/src/wasm/wasm-function-name-table.h
@@ -16,12 +16,15 @@ namespace wasm {
struct WasmModule;
// Encode all function names of the WasmModule into one ByteArray.
+// Returns undefined if the array length would not fit in an integer value.
Handle<Object> BuildFunctionNamesTable(Isolate* isolate, WasmModule* module);
-// Extract the function name for the given func_index from the wasm module.
-// Returns undefined if the function index is invalid.
-Handle<Object> GetWasmFunctionNameFromTable(Handle<ByteArray> wasm_names_table,
- uint32_t func_index);
+// Extract the function name for the given func_index from the function name
+// table.
+// Returns a null handle if the respective function is unnamed (not to be
+// confused with empty names) or the function name is not a valid UTF-8 string.
+MaybeHandle<String> GetWasmFunctionNameFromTable(
+ Handle<ByteArray> wasm_names_table, uint32_t func_index);
} // namespace wasm
} // namespace internal
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | src/wasm/wasm-function-name-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698