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

Unified Diff: test/mjsunit/wasm/js-api.js

Issue 2644893004: [wasm] WebAssembly.compile: pass errors through promise resolver (Closed)
Patch Set: 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 | « src/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/js-api.js
diff --git a/test/mjsunit/wasm/js-api.js b/test/mjsunit/wasm/js-api.js
index 0c68f9bed4bff0f8920d1f5387b88a2a228218aa..403bfb4370a0631893f05d5578aaf8ae9137f913 100644
--- a/test/mjsunit/wasm/js-api.js
+++ b/test/mjsunit/wasm/js-api.js
@@ -547,12 +547,7 @@ assertEq(compile.length, 1);
assertEq(compile.name, "compile");
function assertCompileError(args, err, msg) {
var error = null;
- try {
- compile(...args).catch(e => error = e);
- } catch (e) {
- // TODO: error shouldn't be thrown, but should be globbed onto the promise.
- error = e;
- }
+ compile(...args).catch(e => error = e);
drainJobQueue();
assertEq(error instanceof err, true);
assertEq(Boolean(error.stack.match("js-api.js")), true);
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698