Open
Bug 1890571
Opened 1 year ago
Updated 1 year ago
Improve unwrap API and unwrap-support in APIs
Categories
(Core :: JavaScript Engine, task, P3)
Core
JavaScript Engine
Tracking
()
NEW
People
(Reporter: arai, Unassigned)
References
(Blocks 1 open bug)
Details
JSAPI provides APIs like UncheckedUnwrap to unwrap a wrapper (security wrapper, CCW, etc), and also some API accepts wrapped JSObject* as a parameter.
Unwrap API is used in multiple ways, but the handling around dead wrapper is easily overlooked in the consumer.
It's better providing less-error-prone and more-specialized API for specific scenario (e.g. directly get the global of the unwrapped object, or unwrap only if the type matches, or enter the unwrapped object realm).
Also it's nice to make the dead wrapper always handled inside the JSAPI, so that the consumer doesn't have to check it for regular usage, and also the dead wrapper result in consistent error.
You need to log in
before you can comment on or make changes to this bug.
Description
•