Closed
Bug 1107681
Opened 10 years ago
Closed 10 years ago
fix up the dom uses of WrapptedJSToDictionary to use the cx-less interface
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
RESOLVED
FIXED
People
(Reporter: huseby, Assigned: huseby)
References
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
There are a number of places in the dom code where we handle Observe events that contain wrapped JSObjects that get converted to Dictionaries. With a better cx-less WrappedJSToDictionary function in bug 1107673 all of that code should be cleaned up to use the new function.
Assignee | ||
Comment 1•10 years ago
|
||
fixes up all of the uses of WrappedJSToDictionary in the dom code.
Attachment #8541032 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 2•10 years ago
|
||
try pass: http://mzl.la/1x218Va
Assignee | ||
Comment 3•10 years ago
|
||
The try pass is clean. The only failures are failures in the test framework. Re-running to see if they go away.
Comment 4•10 years ago
|
||
Comment on attachment 8541032 [details] [diff] [review]
Bug_1107681.patch
Review of attachment 8541032 [details] [diff] [review]:
-----------------------------------------------------------------
This looks great! However, I have a few ergonomic changes I'd like to see:
* I don't want to define a local called "cx" here, because that might lead somebody to accidentally using it for non-rooting purposes. So the call should be inlined directly into the rooting constructor.
* Given that this seems to be used frequently, I think it's worth introducing a call that indicates that this is explicitly for rooting, and shaves off a few characters to boot.
How about nsContentUtils::RootingCX() and nsContent::ThreadsafeRootingCX() which would be inline aliases for GetSafeJSContext and ThreadsafeGetSafeJSContext respectively?
nsContentUtils::Root
Attachment #8541032 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 5•10 years ago
|
||
updated to make review changes.
try pass looks clean: http://mzl.la/1zJ6fvW
Attachment #8541032 -
Attachment is obsolete: true
Attachment #8541861 -
Flags: review?(bobbyholley)
Comment 6•10 years ago
|
||
Comment on attachment 8541861 [details] [diff] [review]
Bug_1107681.patch
Review of attachment 8541861 [details] [diff] [review]:
-----------------------------------------------------------------
This looks great, assuming all of this stuff runs on the main thread. r=me
Thanks for doing this!
Attachment #8541861 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 7•10 years ago
|
||
hold off for a moment while I double check that all of these are on the main thread.
Assignee | ||
Comment 8•10 years ago
|
||
Alright, I went through and every place I couldn't guarantee that we were executing on the main thread, I changed the call to RootingCxForThread(). The try pass is here: http://mzl.la/1BfsxCD If that comes back clean, then this can be checked in.
FYI, RootingCxForThread is an alias for GetDefaultJSContextForThread which returns RootingCx if on the main thread otherwise it returns the current thread JS context.
Attachment #8541861 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
Ok, the try pass is clean. This can go in.
Keywords: checkin-needed
Comment 10•10 years ago
|
||
Keywords: checkin-needed
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 11•10 years ago
|
||
Dave, stuff generally only gets resolved when it merges to mozilla-central (and it happens automatically).
Flags: needinfo?(huseby)
You need to log in
before you can comment on or make changes to this bug.
Description
•