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

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

Issue 2005933003: [wasm] globals size is not a per-instance property. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/wasm/wasm-function-name-table.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-function-name-table.cc
diff --git a/src/wasm/wasm-function-name-table.cc b/src/wasm/wasm-function-name-table.cc
index b274520540c3ff44f3eb25d9c2e676ba6a5934cc..60ea977f890eee78789f01f99db2a587e6288aaf 100644
--- a/src/wasm/wasm-function-name-table.cc
+++ b/src/wasm/wasm-function-name-table.cc
@@ -20,7 +20,8 @@ namespace wasm {
// concatenation of all function names.
//
// Returns undefined if the array length would not fit in an integer value.
-Handle<Object> BuildFunctionNamesTable(Isolate* isolate, WasmModule* module) {
+Handle<Object> BuildFunctionNamesTable(Isolate* isolate,
+ const WasmModule* module) {
uint64_t func_names_length = 0;
for (auto& func : module->functions) func_names_length += func.name_length;
int num_funcs_int = static_cast<int>(module->functions.size());
@@ -36,7 +37,7 @@ Handle<Object> BuildFunctionNamesTable(Isolate* isolate, WasmModule* module) {
if (func_names_array.is_null()) return isolate->factory()->undefined_value();
func_names_array->set_int(0, num_funcs_int);
int func_index = 0;
- for (WasmFunction& fun : module->functions) {
+ for (const WasmFunction& fun : module->functions) {
WasmName name = module->GetNameOrNull(&fun);
if (name.start() == nullptr) {
func_names_array->set_int(func_index + 1, -current_offset);
« no previous file with comments | « src/wasm/wasm-function-name-table.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698