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

Unified Diff: test/cctest/wasm/wasm-run-utils.h

Issue 2627943002: [wasm] The interpreter should not grow memory beyond module->mem_max_pages. (Closed)
Patch Set: Comments addressed Created 3 years, 11 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 | « test/cctest/wasm/test-run-wasm-interpreter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/wasm-run-utils.h
diff --git a/test/cctest/wasm/wasm-run-utils.h b/test/cctest/wasm/wasm-run-utils.h
index f747d84f502cf04741dbf1558f712a34d15d6668..0ee7deb4fcf2615e2265c2f9aba138d74fae5c87 100644
--- a/test/cctest/wasm/wasm-run-utils.h
+++ b/test/cctest/wasm/wasm-run-utils.h
@@ -181,6 +181,10 @@ class TestingModule : public ModuleEnv {
rng.NextBytes(raw, end - raw);
}
+ void SetMaxMemPages(uint32_t max_mem_pages) {
+ module_.max_mem_pages = max_mem_pages;
+ }
+
uint32_t AddFunction(FunctionSig* sig, Handle<Code> code, const char* name) {
if (module->functions.size() == 0) {
// TODO(titzer): Reserving space here to avoid the underlying WasmFunction
« no previous file with comments | « test/cctest/wasm/test-run-wasm-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698