Open Bug 1375676 Opened 7 years ago Updated 2 years ago

Can JSObject::callHook() tail recurse and therefore be surprisingly expensive?

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

Details

(Keywords: perf)

From the inverted stack it seems we're using instanceof on a CCW. So unwrapping there probably wouldn't be too surprising... Hopefully Jason's wrapper work will eliminate this one. We also really need to inline JSObject::isCallable() and JSObject::callHook() - I noticed this also affects Object.prototype.toString.
Whiteboard: [qf] → [qf:p1]
Whiteboard: [qf:p1] → [qf:p2]
Priority: -- → P3
Keywords: perf
Whiteboard: [qf:p2] → [qf:f63][qf:p1]
Whiteboard: [qf:f63][qf:p1] → [qf:f64][qf:p1]
Whiteboard: [qf:f64][qf:p1] → [qf:p1:f64]
We inline JSObject::isCallable/callHook now so this is probably no longer as bad. Also the same-compartment-realms work will likely fix this by getting rid of the wrappers - I think we should just wait for that..
Removing [qf] per comment 2.
Whiteboard: [qf:p1:f64]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.