Open Bug 1275312 Opened 8 years ago Updated 2 years ago

Consider adding a public GetPrototypeFromConstructor API

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

Tracking Status
firefox49 --- affected

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

It could look something like:

  JS::GetPrototypeFromConstructor(JSContext *cx,
                                  JSObject* ctor, 
                                  JSProtoKey key);

And yes, I know we already have a js::GetPrototypeFromConstructor with different semantics...
JS_NewObjectForConstructor() should be updated instead.

It currently (at least on JSAPI45) doesn't behave correctly when the class in subclassed.
Blocks: 1317658
Blocks: jsapi
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.