Closed
Bug 1287442
Opened 8 years ago
Closed 8 years ago
Simplify the code in nsContentUtils::GetDocShellForEventTarget
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: kats, Assigned: bzbarsky)
Details
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
In bug 970346, I moved the function at [1] to nsContentUtils to reuse it in another place. During the review, bz commented that code could be simplified [2]. This is a follow-up bug to simplify the code. Quoting from bz's comment:
> So in all cases except the node->OwnerDoc() one you go through
> nsPIDOMWindowInner, and even in that case you could have used
> GetScriptHandlingObject, right?
>
> And once you have a nsPIDOMWindowInner you can GetDocShell() on it directly
> instead of going through GetExtantDoc.... Then again, I guess you just moved
> this code. Maybe a followup bug on simplifying it, just in case that actually
> changes its behavior.
[1] http://searchfox.org/mozilla-central/rev/bfcc10319e4e3ce78367fa9bba9316f7eb5248b6/dom/events/EventListenerManager.cpp#1158
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=970346#c48
Assignee | ||
Comment 1•8 years ago
|
||
Olli, can you think of a reason to not do that?
Flags: needinfo?(bugs)
Comment 2•8 years ago
|
||
Going from inner window to docshell sounds ok to me. I guess I just didn't think of window->docshell route when reviewing bug 970346.
Flags: needinfo?(bugs)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8772520 -
Flags: review?(bugs)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Updated•8 years ago
|
Attachment #8772520 -
Flags: review?(bugs) → review+
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/33e19f0223e7
Simplify nsContentUtils::GetDocShellForEventTarget a bit. r=smaug
Comment 5•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•