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

Unified Diff: test/common/wasm/wasm-module-runner.cc

Issue 2405293002: [wasm] Add stack checks to loops. (Closed)
Patch Set: comments addressed Created 4 years, 2 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/common/wasm/wasm-module-runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/common/wasm/wasm-module-runner.cc
diff --git a/test/common/wasm/wasm-module-runner.cc b/test/common/wasm/wasm-module-runner.cc
index 98166ee422e574a88d264a26bdb159a4a60a5143..1d993af2dff05924eda9b7a116f912d498236a90 100644
--- a/test/common/wasm/wasm-module-runner.cc
+++ b/test/common/wasm/wasm-module-runner.cc
@@ -78,17 +78,16 @@ const Handle<JSObject> InstantiateModuleForTesting(Isolate* isolate,
}
const Handle<JSObject> CompileInstantiateWasmModuleForTesting(
- Isolate* isolate, Zone* zone, const byte* module_start,
- const byte* module_end, ModuleOrigin origin) {
- ErrorThrower thrower(isolate, "CompileInstantiateWasmModule");
+ Isolate* isolate, ErrorThrower* thrower, Zone* zone,
+ const byte* module_start, const byte* module_end, ModuleOrigin origin) {
std::unique_ptr<const WasmModule> module(DecodeWasmModuleForTesting(
- isolate, zone, &thrower, module_start, module_end, origin));
+ isolate, zone, thrower, module_start, module_end, origin));
if (module == nullptr) {
- thrower.Error("Wasm module decode failed");
+ thrower->Error("Wasm module decode failed");
return Handle<JSObject>::null();
}
- return InstantiateModuleForTesting(isolate, &thrower, module.get());
+ return InstantiateModuleForTesting(isolate, thrower, module.get());
}
int32_t RunWasmModuleForTesting(Isolate* isolate, Handle<JSObject> instance,
@@ -104,9 +103,9 @@ int32_t CompileAndRunWasmModule(Isolate* isolate, const byte* module_start,
const byte* module_end, ModuleOrigin origin) {
HandleScope scope(isolate);
Zone zone(isolate->allocator());
-
+ ErrorThrower thrower(isolate, "CompileAndRunWasmModule");
Handle<JSObject> instance = CompileInstantiateWasmModuleForTesting(
- isolate, &zone, module_start, module_end, origin);
+ isolate, &thrower, &zone, module_start, module_end, origin);
if (instance.is_null()) {
return -1;
}
@@ -224,7 +223,6 @@ void SetupIsolateForWasmModule(Isolate* isolate) {
WasmJs::InstallWasmModuleSymbolIfNeeded(isolate, isolate->global_object(),
isolate->native_context());
}
-
} // namespace testing
} // namespace wasm
} // namespace internal
« no previous file with comments | « test/common/wasm/wasm-module-runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698