Closed
Bug 974127
Opened 10 years ago
Closed 10 years ago
nsContentUtils::IsUserFocusIgnored can loop infinitely
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
Tracking | Status | |
---|---|---|
b2g-v1.3T | --- | fixed |
People
(Reporter: jrmuizel, Assigned: smaug)
References
Details
Attachments
(1 file)
801 bytes,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
I ran into this running reftests. aNode is an HTML element, QueryInterface(aNode) to nsIMozBrowserFrame returns null, and aNode->OwnerDoc()->GetWindow() also returns null and so we loop forever.
Comment 1•10 years ago
|
||
Which reftest was that? This could manifest itself as an intermittent test timeout.
Reporter | ||
Comment 2•10 years ago
|
||
This was during one of the bmp refrests. I don't remember which one. Afaik the tests are not really interesting from a browser point of view.
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8378579 -
Flags: review?(ehsan)
Comment 4•10 years ago
|
||
Comment on attachment 8378579 [details] [diff] [review] patch Review of attachment 8378579 [details] [diff] [review]: ----------------------------------------------------------------- Can you please document what the loop termination condition here is? It's not very clear what this code is trying to do, but the fix makes sense. Thanks!
Attachment #8378579 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 5•10 years ago
|
||
It is not clear? Just a document which doesn't have a window (anymore).
Comment 6•10 years ago
|
||
(In reply to comment #5) > It is not clear? Just a document which doesn't have a window (anymore). Yes, well, I was talking about a higher level description. What you said is basically converting the code to English. :-)
Assignee | ||
Comment 7•10 years ago
|
||
Ok, still don't understand what kind of comment you want.
Comment 8•10 years ago
|
||
(In reply to comment #7) > Ok, still don't understand what kind of comment you want. So here is my understanding of this code. We try to see if the current node is a mozbrowser iframe. If not, we try to get it from the window object of the node's owner document. Now, it's not clear to me what exactly happens if the window's frame is not a mozbrowser iframe. According to the code we should try to get the window again. Does that mean that we're walking up the chain of the hosting frames until we find a mozbrowser iframe? Or do we stop after checking at that point and bail out of the loop? (Note that even though the purpose of this loop may be completely clear to you, it's not to me, and comments are meant to make things like this clear to the readers of the code who are not necessarily as familiar with the code as others.)
Assignee | ||
Comment 9•10 years ago
|
||
The method has already a comment https://hg.mozilla.org/integration/mozilla-inbound/rev/d3b246449a75
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d3b246449a75
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•10 years ago
|
Assignee: nobody → bugs
Updated•10 years ago
|
blocking-b2g: --- → 1.3T?
Comment 11•10 years ago
|
||
Blocking as this is needed by 1005391 and Ni :fabrice to help with uplift on 1.3T branch.
blocking-b2g: 1.3T? → 1.3T+
Flags: needinfo?(fabrice)
Comment 12•10 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g28_v1_3t/rev/31c2f2808051
status-b2g-v1.3T:
--- → fixed
Flags: needinfo?(fabrice)
You need to log in
before you can comment on or make changes to this bug.
Description
•