Closed
Bug 1909220
Opened 2 years ago
Closed 2 years ago
Allow embeddings to define classes without a globally available constructor
Categories
(Core :: JavaScript Engine, enhancement, P1)
Tracking
()
RESOLVED
FIXED
130 Branch
| Tracking | Status | |
|---|---|---|
| firefox130 | --- | fixed |
People
(Reporter: me, Assigned: me)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Steps to reproduce:
Currently it is not possible for an embedding to create builtin classes using JS_InitClass without exposing the class' constructor globally, this is an issue if the embedding wants to create classes which are not found on the global.
I propose we modify JS_InitClass to respect js::ClassSpec::DontDefineConstructor so that it would be possible for an embedding to create such builtin classes
| Assignee | ||
Comment 1•2 years ago
|
||
The flag was previously only respected for internal builtins, not classes defined by the embedding using JS_InitClass. That meant one couldn't use JS_InitClass to define classes without a globally available constructor.
Updated•2 years ago
|
Assignee: nobody → me
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Updated•2 years ago
|
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Updated•2 years ago
|
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7898786b44c9
Respect js::ClassSpec::DontDefineConstructor in DefineConstructorAndPrototype. r=jandem
Comment 3•2 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
status-firefox130:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 130 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•