Closed
Bug 526939
Opened 15 years ago
Closed 14 years ago
DOM Inspector hangs trying to find a ID that doesn't exist
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jruderman, Assigned: crussell)
References
Details
(Keywords: regression)
Attachments
(3 files, 1 obsolete file)
230.38 KB,
text/plain
|
Details | |
3.09 KB,
patch
|
sdwilsh
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
68.73 KB,
patch
|
crussell
:
review+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Open DOM Inspector. 2. Cmd+F 3. Type something that isn't an ID in the document. 4. Press Enter. Result: DOM Inspector hangs, even on short documents. Expected: Tell me 'not found', preferably without using a nested dialog. Tested with: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20091103 Firefox/3.7a1pre Happens with both: DOM Inspector 2.0.3 DOM Inspector 2.0.4 (AMO sandbox)
Comment 1•15 years ago
|
||
Do you have a stack of the hang?
Reporter | ||
Comment 2•15 years ago
|
||
Assignee | ||
Comment 3•14 years ago
|
||
I get the same thing on latest Ubuntu. Hanging occurs on XULRunner 1.9.2 while the same app using 1.9.1 works fine.
OS: Mac OS X → All
Assignee | ||
Comment 4•14 years ago
|
||
I traced it back to improper behavior for inDeepTreeWalker::nextNode, where it will just sit on the last node if the end of the document is reached, instead of setting its currentNode to null. Seems like it has something to do with the rewrite in bug 522601.
Keywords: regression
Comment 5•14 years ago
|
||
> improper behavior for inDeepTreeWalker::nextNode, where it will just sit on the
> last node if the end of the document is reached, instead of setting its
> currentNode to null
That's the correct behavior of a DOM TreeWalker. The DOM spec is very clear on this issue:
nextNode
Moves the TreeWalker to the next visible node in document order relative to
the current node, and returns the new node. If the current node has no next
node, or if the search for nextNode attempts to step upward from the
TreeWalker's root node, returns null, and retains the current node.
So the real issue is that I missed an inDOMTreeWalker consumer that was depending on the old, buggy, behavior...
Colby, did you digging turn up the relevant consumer by chance, or should I look for it?
Comment 6•14 years ago
|
||
And yes, the new behavior was definitely introduced in bug 522601.
Blocks: 522601
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #5) > That's the correct behavior of a DOM TreeWalker. The DOM spec is very clear on > this issue: Oops! I've even read that paragraph at least three times without understanding what it actually says. > So the real issue is that I missed an inDOMTreeWalker consumer that was > depending on the old, buggy, behavior... > > Colby, did you digging turn up the relevant consumer by chance, or should I > look for it? And I'm usually better at cross-referencing bugs, too. Bug 526939.
Assignee | ||
Comment 8•14 years ago
|
||
Err... maybe I should pay attention to the bug IDs as well. It's in resources/content/viewers/dom/dom.js FindNext().
Assignee | ||
Comment 9•14 years ago
|
||
Assignee | ||
Comment 10•14 years ago
|
||
Attachment #435502 -
Flags: review?(sdwilsh)
Assignee | ||
Updated•14 years ago
|
Severity: normal → critical
Hardware: x86 → All
Comment 11•14 years ago
|
||
Comment on attachment 435502 [details] [diff] [review] findNext fix that expects inDeepTreeWalker::NextNode's TreeWalker behavior (apply this second) r=sdwilsh
Attachment #435502 -
Flags: superreview?(bzbarsky)
Attachment #435502 -
Flags: review?(sdwilsh)
Attachment #435502 -
Flags: review+
Comment 12•14 years ago
|
||
Comment on attachment 435501 [details] [diff] [review] dom.js cleanup >+ this.setProcessingInstructions( >+ PrefUtils.getPref("inspector.dom.showProcessingInstructions")); >+ this.setAccessibleNodes( >+ PrefUtils.getPref("inspector.dom.showAccessibleNodes")); >+ this.setWhitespaceNodes( >+ PrefUtils.getPref("inspector.dom.showWhitespaceNodes")); nit: for multiline calls like this, do this: callingFunc( arguemnt ); r=sdwilsh
Attachment #435501 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 13•14 years ago
|
||
Attachment #435501 -
Attachment is obsolete: true
Attachment #435511 -
Flags: review+
Comment 14•14 years ago
|
||
Comment on attachment 435502 [details] [diff] [review] findNext fix that expects inDeepTreeWalker::NextNode's TreeWalker behavior (apply this second) Oh, awesome. I'd been planning to look at this code tomorrow, but it looks like I win. sr=me, and thank you for cleaning up my mess!
Attachment #435502 -
Flags: superreview?(bzbarsky) → superreview+
Assignee | ||
Comment 15•14 years ago
|
||
(In reply to comment #14) > Oh, awesome. I'd been planning to look at this code tomorrow, but it looks > like I win. > > sr=me, and thank you for cleaning up my mess! I was impatient. And if I'd realized that that inDeepTreeWalker was doing what it was supposed to be doing, I'd have just done this Friday.
Keywords: checkin-needed
Assignee | ||
Updated•14 years ago
|
Attachment #435511 -
Attachment description: dom.js cleanup mkII → dom.js cleanup mkII (apply this first)
Assignee | ||
Updated•14 years ago
|
Attachment #435502 -
Attachment description: findNext fix that expects inDeepTreeWalker::NextNode's TreeWalker behavior → findNext fix that expects inDeepTreeWalker::NextNode's TreeWalker behavior (apply this second)
Comment 16•14 years ago
|
||
landed http://hg.mozilla.org/dom-inspector/rev/832c66dff1b4 http://hg.mozilla.org/dom-inspector/rev/27b0e9ef1715 I forget to specify -u to point Colby name so checkins appears under my name. If it's important issue then I'd like to fix this. However I need to realize how to do this, please ping me if you know this.
Comment 17•14 years ago
|
||
It's somewhat important, but you can't fix it post-fact. You have to get it right the first time (e.g. by using "hg out" before pushing).
Comment 18•14 years ago
|
||
(In reply to comment #17) > It's somewhat important, but you can't fix it post-fact. You have to get it > right the first time (e.g. by using "hg out" before pushing). or backout and reland
Comment 19•14 years ago
|
||
(In reply to comment #18) > (In reply to comment #17) > > It's somewhat important, but you can't fix it post-fact. You have to get it > > right the first time (e.g. by using "hg out" before pushing). > or backout and reland Shawn, please make decision as DOMi owner :)
Comment 20•14 years ago
|
||
(In reply to comment #19) > Shawn, please make decision as DOMi owner :) I'll leave it up to the person who wrote the patch. If they don't care, you can leave it in.
Assignee | ||
Comment 21•14 years ago
|
||
I told surkov via that I didn't mind.
Assignee | ||
Comment 22•14 years ago
|
||
that's via IRC
Comment 23•14 years ago
|
||
(In reply to comment #21) > I told surkov via that I didn't mind. Ok, thanks. Next time I will be more careful.
You need to log in
before you can comment on or make changes to this bug.
Description
•