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

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

Issue 2977543002: [wasm] Allow full u32 range for table maximum in WebAssembly.Table constructor. (Closed)
Patch Set: [wasm] Allow full u32 range for table maximum in WebAssembly.Table constructor. Created 3 years, 5 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-objects.h ('k') | test/mjsunit/wasm/table.js » ('j') | 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 c55febcd23ea4d300c97bf92f72e6b0430cd80a3..7d9d2297127079e302115e807e65e7969329b14e 100644
--- a/src/wasm/wasm-objects.cc
+++ b/src/wasm/wasm-objects.cc
@@ -184,7 +184,8 @@ Handle<WasmTableObject> WasmTableObject::New(Isolate* isolate, uint32_t initial,
}
table_obj->set_functions(**js_functions);
DCHECK_EQ(maximum, static_cast<int>(maximum));
- table_obj->set_maximum_length(static_cast<int>(maximum));
+ Handle<Object> max = isolate->factory()->NewNumber(maximum);
+ table_obj->set_maximum_length(*max);
Handle<FixedArray> dispatch_tables = isolate->factory()->NewFixedArray(0);
table_obj->set_dispatch_tables(*dispatch_tables);
« no previous file with comments | « src/wasm/wasm-objects.h ('k') | test/mjsunit/wasm/table.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698