Closed Bug 874612 Opened 11 years ago Closed 11 years ago

Make nsIXPConnectWrappedNative methods take HandleId instead of jsid

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Because getting a JSContext can maybe gc, or so the rooting analysis thinks, so we can't root inside them.

The good news is that passing in a handle is easy.
We could also try to change nsIXPCScriptable to take handles here, but I'd rather work on removing them all instead
Attachment #752366 - Flags: review?(bobbyholley+bmo)
Comment on attachment 752366 [details] [diff] [review]
Make some nsIXPConnectWrappedNative methods take a Handle<jsid> instead of a jsid.

Review of attachment 752366 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/xpconnect/src/XPCWrappedNative.cpp
@@ +2998,5 @@
>      return NS_OK;
>  }
>  
> +/* XPCNativeInterface FindInterfaceWithMember (in JSHandleId name); */
> +NS_IMETHODIMP XPCWrappedNative::FindInterfaceWithMember(JS::HandleId name,

Just HandleId in XPConnect cpp files, since we should be using namespace JS. Here and below.
Attachment #752366 - Flags: review?(bobbyholley+bmo) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/99e821df3d61 with that change.
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla24
https://hg.mozilla.org/mozilla-central/rev/99e821df3d61
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: