Closed Bug 1315390 Opened 8 years ago Closed 8 years ago

Baldr: exported wasm functions shouldn't be constructors

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: luke, Assigned: luke)

References

Details

Attachments

(1 file)

Per last line of https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects

What's nice is that this makes exported wasm functions vanilla native functions.
Attachment #8807764 - Flags: review?(bbouvier)
Comment on attachment 8807764 [details] [diff] [review]
non-constructible

Review of attachment 8807764 [details] [diff] [review]:
-----------------------------------------------------------------

Who's done this ASMJS_CTOR to WASM_CTOR renaming anyways :) Thanks!

::: js/src/wasm/WasmInstance.cpp
@@ +657,5 @@
>      }
>  
> +    if (isAsmJS() && args.isConstructing()) {
> +        // By spec, when a JS function is called as a constructor and this
> +        // function returns a primary type, which is the case for all wasm

nit: wasm -> asm.js
Attachment #8807764 - Flags: review?(bbouvier) → review+
Pushed by lwagner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e2562586fd5e
Baldr: exported wasm functions shouldn't be constructors (r=bbouvier)
https://hg.mozilla.org/mozilla-central/rev/e2562586fd5e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: