Closed Bug 1221292 Opened 9 years ago Closed 9 years ago

add nondeterministicGetWeakMapKeys to ThreadSafeChromeUtils

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

Attachments

(1 file, 1 obsolete file)

On irc :fitzgen suggested adding nondeterministicGetWeakMapKeys to
ThreadSafeChromeUtils as a precursor to bug 1165807.
That way the new functionality could be available in workers as well.
Comment on attachment 8686176 [details] [diff] [review]
move nondeterministicGetWeakMapKeys to ThreadSafeChromeUtils

Nick suggested this in bug 1165807, the idea being, IIUC, that we're going
to want access to this information in workers as well.

I did not move the tests out of xpconnect.  It was unclear to me if I should.
(Some of them purely test this function; I suppose moving those might make
sense.  Others use this just for testing the results though.)

I don't know how to test the shumway change but I presume try will do the right thing.  I believe I got all the spots calling this method on Cu.

I'm curious about the need for the Bindings.conf change.  The webidl bindings
doc on MDN says that use of "any" should add a JSContext* argument; but this
seems not to work for static methods.  Should I file a bug for this?  Or is
it intentional?

I removed the "only for tests" comment, since it's clear that hasn't been the
case for a while.
Attachment #8686176 - Flags: review?(bzbarsky)
Attachment #8686176 - Flags: feedback?(nfitzgerald)
Comment on attachment 8686176 [details] [diff] [review]
move nondeterministicGetWeakMapKeys to ThreadSafeChromeUtils

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

\o/ Thanks!
Attachment #8686176 - Flags: feedback?(nfitzgerald) → feedback+
Comment on attachment 8686176 [details] [diff] [review]
move nondeterministicGetWeakMapKeys to ThreadSafeChromeUtils

> The webidl bindings doc on MDN says that use of "any" should add a JSContext*
> argument; but this seems not to work for static methods.

Looks like the documentation didn't get updated after bug 1025973.  I've done that now, but long story short you don't need the implicitJSContext thing and can just use aGlobal.Context().

r=me with that change and HandleValue replaced by Handle<JS::Value> and MutableHandleValue replaced by MutableHandle<JS::Value> and RootedObject replaced by Rooted<JSObject*>.
Attachment #8686176 - Flags: review?(bzbarsky) → review+
Updated per review.
Attachment #8686176 - Attachment is obsolete: true
Attachment #8686240 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/7c22b95c0e29
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: