Closed
Bug 782792
Opened 12 years ago
Closed 12 years ago
Make XPCJSRuntime::mJSHolders infallible
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Less gross code, less error paths to worry about.
Assignee | ||
Updated•12 years ago
|
Summary: Make mJSHolders infallible → Make XPCJSRuntime::mJSHolders infallible
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 651897 [details] [diff] [review]
convert it
Does my definition of JSHolder in xpcprivate.h look reasonable, Justin? I'm making a hash table from void* to nsScriptObjectTracer*. I'm reasonably confident about the rest, but these key types weird me out a bit.
Attachment #651897 -
Flags: feedback?(justin.lebar+bug)
Comment 3•12 years ago
|
||
Not an nsDataHashtable?
Comment 4•12 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #2)
> Comment on attachment 651897 [details] [diff] [review]
> convert it
>
> Does my definition of JSHolder in xpcprivate.h look reasonable, Justin?
I think Ms2ger is right, nsDataHashtable would make more sense. Although this is not bad at all.
Updated•12 years ago
|
Attachment #651897 -
Flags: feedback?(justin.lebar+bug) → feedback+
Assignee | ||
Comment 5•12 years ago
|
||
Ah, nice, I didn't notice that! Thanks, I'll switch it over.
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #651897 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #652898 -
Flags: review?(bobbyholley+bmo)
Comment 7•12 years ago
|
||
Comment on attachment 652898 [details] [diff] [review]
JSDHash to nsDataHashtable
The documentation seems to imply that we'd want an nsClassHashtable here, since nsScriptObjectTracer isn't a primitive type. Is that what we want here? I have no idea.
This looks reasonable, but I'm no expert in our hash tables, nor have I seen this cycle collection code before. But r=bholley if you're comfortable with that.
Attachment #652898 -
Flags: review?(bobbyholley+bmo) → review+
Assignee | ||
Comment 8•12 years ago
|
||
nsClassHashtable just looks like a type that does nsRefPtr on its values, which isn't what we want here. I'll check that this works in a try run.
Assignee | ||
Comment 9•12 years ago
|
||
Pushed with a slightly inspecific commit message.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c0d1f69cc901
try run: https://tbpl.mozilla.org/?tree=Try&rev=6763c07cc2be
(the permaorange there is something that has since been disabled, see bug 681138)
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•