Closed Bug 514186 Opened 13 years ago Closed 10 years ago

JSAPI function to check for method without tripping method read barrier

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jorendorff, Unassigned)

References

Details

Follow-up to bug 471214 comment 117:
> This is obvious in hindsight. XBL has JS-implemented methods, they are null
> closures defined in object initialisers. One such is QueryInterface on the
> _observer field in findbar.xml. Alas XPConnect wants to QI, so it digs out the
> value using JS_GetPropertyById, which runs the method barrier.

This is in nsXPCWrappedJSClass::CallQueryInterfaceOnJSObject.

Hard to tell if exposing something like js_TryMethod would be enough or if we really need JS_UnsafeGetRawMethodById.
Don't forget to fix nsXPCWrappedJSClass::CallMethod, which calls JS_GetMethod. Anything else like these?

Wait, who will take this bug? I will if no one else, but could use help. mrbkap would be best :-).

/be
Depends on: 471214
Flags: wanted1.9.2?
js_TryMethod suppresses some exceptions and isn't the right tool. Just js_GetMethod as a FRIEND API would do for a minimal fix.

/be
Obviated by bug 739808.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.