Baldr: exported wasm functions shouldn't be constructors

RESOLVED FIXED in Firefox 52

Status

()

Core
JavaScript Engine
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: luke, Assigned: luke)

Tracking

(Blocks: 1 bug)

Trunk
mozilla52
Points:
---

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Created attachment 8807764 [details] [diff] [review]
non-constructible

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+

Comment 2

2 years ago
Pushed by lwagner@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e2562586fd5e
Baldr: exported wasm functions shouldn't be constructors (r=bbouvier)

Comment 3

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e2562586fd5e
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox52: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.