Closed Bug 1603496 Opened 5 years ago Closed 5 years ago

Tidy up reference type type checks

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

The code that checks that a given JS value that flows into wasm has the right type, or boxes the value in the case of an anyref, is fairly elaborate and is repeated several times; this is error-prone (indeed the nullref patch had an error that I discovered while working on the exnref patch). So abstract the test out and simplify the clients.

While we're in here, generalize some code that assumes that the only reference types are anyref and funcref.

Depends on: 1599125
Blocks: 1335652

Lift the code that checks JS values against reference types (and boxes anyref)
from all the places where it is repeated into a common function.

Clean up some code that assumes that the only reference types are anyref
and funcref.

Type: enhancement → task
Priority: -- → P3
Attachment #9115536 - Attachment description: Bug 1603496 - abstract reference-type checking on JS values. r?rhunt → Bug 1603496 - abstract reference-type checking on JS values. r=rhunt
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f23128d93320 abstract reference-type checking on JS values. r=rhunt
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: