Bug 204054
Summary: | WebAssembly exception names | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jan M <mail> |
Component: | WebAssembly | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | bfulgham, saam, ysuzuki |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Jan M
The WebAssembly exceptions (also thrown by the Wasm engine) have name properties
deviating from the other 3 major JS/Wasm engines.
Ideally a WebAssembly.CompileError should have name "CompileError", etc.
Consider:
let e1 = new WebAssembly.CompileError("a compile error")
let e2 = new WebAssembly.LinkError("a link error")
let e3 = new WebAssembly.RuntimeError("a runtime error")
print(e1.name, e1);
print(e2.name, e2);
print(e3.name, e3);
and compare the output across v8, spidermonkey, chakra, and javascriptcore:
$ v8 exceptions.js
CompileError CompileError: a compile error
LinkError LinkError: a link error
RuntimeError RuntimeError: a runtime error
$ sm exceptions.js
CompileError CompileError: a compile error
LinkError LinkError: a link error
RuntimeError RuntimeError: a runtime error
$ ch exceptions.js
CompileError CompileError: a compile error
LinkError LinkError: a link error
RuntimeError RuntimeError: a runtime error
$ jsc exceptions.js
Error Error: a compile error (evaluating 'new WebAssembly.CompileError("a compile error")')
Error Error: a link error (evaluating 'new WebAssembly.LinkError("a link error")')
Error Error: a runtime error (evaluating 'new WebAssembly.RuntimeError("a runtime error")')
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Yusuke Suzuki
*** This bug has been marked as a duplicate of bug 210980 ***