Closed
Bug 1185527
Opened 9 years ago
Closed 9 years ago
nsScriptErrorWithStack shadows the refcount in nsScriptError
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: mccr8, Assigned: mccr8)
References
Details
Attachments
(1 file)
11.85 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 2•9 years ago
|
||
It isn't a big deal. The virtual AddRef/Release ensure we only use the right one. This is also the sort of tedious non-local property that should be caught by static analysis (as we should get with bug 602122). The fix for this would be something like change nsScriptError into a nsScriptErrorBase class that does not implement refcounting, but is otherwise the same as nsScriptError. nsScriptErrorWithStack stays the same, except that it inherits from nsScriptErrorBase instead. Then you define a new nsScriptError class which inherits from nsScriptErrorBase, but doesn't do anything except implement refcounting. An example of this is nsArrayBase, nsArray, and nsArrayCC.
Assignee | ||
Comment 3•9 years ago
|
||
I can fix this unless Michael wants to.
Assignee: nobody → continuation
Flags: needinfo?(poirot.alex)
Comment 4•9 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3) > I can fix this unless Michael wants to. Go ahead.
Assignee | ||
Comment 5•9 years ago
|
||
This avoids shadowing the refcount if nsScriptErrorWithScript inherited from nsScriptError. Mostly just a lot of search and replace. try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=85a79af5458b
Attachment #8639107 -
Flags: review?(gkrizsanits)
Comment 6•9 years ago
|
||
Comment on attachment 8639107 [details] [diff] [review] Split out a refcountless base class for nsScriptError. Review of attachment 8639107 [details] [diff] [review]: ----------------------------------------------------------------- LGTM
Attachment #8639107 -
Flags: review?(gkrizsanits) → review+
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/20afa46d73c1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in
before you can comment on or make changes to this bug.
Description
•