Closed
Bug 658076
Opened 13 years ago
Closed 13 years ago
nsSubDocumentFrame uses content to get docshell
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: stechz, Assigned: stechz)
Details
Attachments
(1 file, 1 obsolete file)
1.15 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Using content to get docshell is fine for local browsers, but this does not hold true for remote browsers. Since I don't know how to get the docshell I've just returned early. If someone knows how to get the docshell otherwise, I'd be happy to do so. :)
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #533435 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ben
Comment 2•13 years ago
|
||
>+ while (true) {}
What's the point of this change?
You can't get a docshell pointer in the remote browser case, because the docshell is in the other process.
The code without this change will get null for docShellAsItem and return early. So this change is not actually changing behavior at all as far as I can tell... (well, except for the hangs introduced by the while (true) bit on other codepaths).
What are you actually trying to do here?
(On a side note, it does look like we don't communicate the content-primary vs content-targetable changes down to the content process.... or do we do that somewhere else? Or do we not have such a distinction at all here? It might not matter if you don't allow sidebars.)
Assignee | ||
Comment 3•13 years ago
|
||
> What's the point of this change? Sorry, leftover debugging stuff! > You can't get a docshell pointer in the remote browser case, because the > docshell is in the other process. Oh, I thought it was trying to get the parent docshell of the content frame, which I thought would be in the main process. > What are you actually trying to do here? Remove a warning. > (On a side note, it does look like we don't communicate the content-primary > vs content-targetable changes down to the content process.... or do we do > that somewhere else? Or do we not have such a distinction at all here? It > might not matter if you don't allow sidebars.) I believe we don't do that right now. Perhaps we should file a separate bug for Firefox's benefit.
Comment 4•13 years ago
|
||
> Oh, I thought it was trying to get the parent docshell of the content frame Ah, no. It's trying to get the child docshell. > Remove a warning. We should consider just removing the warning, then... On the other hand, in this case the warning is just showing the existence of a bug: in the ipc case we're not handling the primary-vs-targetable distinction correctly. So the warning is doing its job!
Assignee | ||
Comment 5•13 years ago
|
||
> We should consider just removing the warning, then... On the other hand, in
> this case the warning is just showing the existence of a bug: in the ipc
> case we're not handling the primary-vs-targetable distinction correctly. So
> the warning is doing its job!
It's a good point. I like the warning in GetDocShell because it points to broken things, and I suppose an early return isn't really fixing anything.
Let me propose this: leave the warning for GetDocShell in, add a TODO with a bug # and an early return.
Comment 6•13 years ago
|
||
That sounds fine to me.
Assignee | ||
Comment 7•13 years ago
|
||
Also, is this code doing almost exactly the same thing? http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsFrameLoader.cpp#699
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #533681 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•13 years ago
|
Attachment #533435 -
Attachment is obsolete: true
Attachment #533435 -
Flags: review?(bzbarsky)
Comment 9•13 years ago
|
||
Comment on attachment 533681 [details] [diff] [review] nsSubDocumentFrame uses content to get docshell r=me
Attachment #533681 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 10•13 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/c7113f78446b
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•