Closed
Bug 553697
Opened 15 years ago
Closed 15 years ago
JavaScript error "_content is null" in console.xul (Error Console)
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mnyromyr, Assigned: crussell)
References
Details
Attachments
(2 files, 4 obsolete files)
1.72 KB,
patch
|
sdwilsh
:
review+
neil
:
superreview+
crussell
:
feedback+
|
Details | Diff | Splinter Review |
37.53 KB,
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
Hitting ctrl-shift-I in the Error Console will result in
Error: _content is null
Source File: chrome://global/content/console.xul
Line: 1
and no DOM Inspector window.
Using the menuitem mousically works as inspected.
Comment 1•15 years ago
|
||
In the DOM Inspector tasksOverlay.xul
change:
<command id="Tasks:InspectPage" oncommand="inspectDOMDocument(_content.document);"/>
To:
<command id="Tasks:InspectPage"
oncommand="inspectDOMDocument(content ? content.document : document);"/>
1. The TB overlay needs to be changed too.
2 s/_content/content/g for all DOMi files.
Component: Error Console → DOM Inspector
OS: Linux → All
Product: SeaMonkey → Other Applications
QA Contact: error-console → dom-inspector
Hardware: x86 → All
Assignee | ||
Comment 2•15 years ago
|
||
What application does this occur in?
Comment 3•15 years ago
|
||
> What application does this occur in?
SeaMonkey 2.0.3.
Because the DOM Inspector Overlay is pulled into several windows including the Error Console. Ctrl-Shift-I works in those windows. Except that for the SeaMonkey windows that do not have a content window (Error Console, Download Manager), "content" (or "_content") is null.
Reporter | ||
Comment 4•15 years ago
|
||
I originally filed this for SeaMonkey trunk, but it also happens in current SeaMonkey releases, i.e. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100205 Mnenhy/0.8.0pre3 SeaMonkey/2.0.3".
Assignee | ||
Comment 5•15 years ago
|
||
I also changed the js to uniformly use XPCU. XULNS const isn't necessary, we already have kXULNSURI const from utils.js. Transaction manager interface constant from utils.js isn't needed anymore, either.
Assignee | ||
Comment 6•15 years ago
|
||
(In reply to comment #1)
> <command id="Tasks:InspectPage"
> oncommand="inspectDOMDocument(_content.document);"/>
>
> To:
>
> <command id="Tasks:InspectPage"
> oncommand="inspectDOMDocument(content ? content.document :
> document);"/>
>
> 1. The TB overlay needs to be changed too.
I didn't do a non-null check part for the Thunderbird overlay. Do we need to? is mailWindowOverlay.xul applicable anywhere outside of the main window or the view message window, and if so, is it expected that window.content could be null there?
Attachment #449958 -
Flags: review?(sdwilsh)
Attachment #449958 -
Flags: feedback?
Assignee | ||
Updated•15 years ago
|
Attachment #449958 -
Flags: feedback? → feedback?(philip.chee)
Assignee | ||
Comment 7•15 years ago
|
||
Correct attachment this time. Also, the changes from the second patch aren't in here so that the change is easier to see. I think Neil thinks these kinds of patches are silly (where I change one line, only to change it again in a subsequent patch).
Attachment #449956 -
Attachment is obsolete: true
Attachment #449956 -
Flags: review?(sdwilsh)
Assignee | ||
Updated•15 years ago
|
Assignee | ||
Updated•15 years ago
|
Attachment #449963 -
Flags: review?(sdwilsh)
Comment on attachment 449963 [details] [diff] [review]
inspector.js, sidebar.js, tasksOverlay.xul, and tasksOverlay-tb.xul cleanup
>+// dump text to the Error Console
> function debug(aText)
> {
> // XX comment out to reduce noise
>- consoleDump(aText);
>- //dump(aText);
>-}
>-
>-// dump text to the Error Console
>-function consoleDump(aText)
>-{
>- var csClass = Components.classes['@mozilla.org/consoleservice;1'];
>- var cs = csClass.getService(Components.interfaces.nsIConsoleService);
>+ XPCU.getService("@mozilla.org/consoleservice;1", "nsIConsoleService");
> cs.logStringMessage(aText);
> }
Shouldn't this be var cs = XPCU... ?
Assignee | ||
Comment 9•15 years ago
|
||
Attachment #449963 -
Attachment is obsolete: true
Attachment #449982 -
Flags: review?(sdwilsh)
Attachment #449963 -
Flags: review?(sdwilsh)
Comment 10•15 years ago
|
||
Comment on attachment 449958 [details] [diff] [review]
check for non-null content in SeaMonkey overlay
> - oncommand="inspectDOMDocument(content.document);"/>
> + oncommand="inspectDOMDocument(content ? content.document : content);"/>
Err, typo? Should be:
(content ? content.document : document)
f+=me with that fixed.
> I didn't do a non-null check part for the Thunderbird overlay. Do we need to?
> is mailWindowOverlay.xul applicable anywhere outside of the main window or the
> view message window, and if so, is it expected that window.content could be
> null there?
Good point. A quick MXR says no but, please check with a Thunderbird peer.
Attachment #449958 -
Flags: feedback?(philip.chee) → feedback+
Assignee | ||
Comment 11•15 years ago
|
||
I didn't get an authoritative answer, but Thunderbird on OS X is kind of wonky anyway. I changed it to check for the existence of content just to be safe.
Attachment #449958 -
Attachment is obsolete: true
Attachment #451791 -
Flags: review?(sdwilsh)
Attachment #451791 -
Flags: feedback+
Attachment #449958 -
Flags: review?(sdwilsh)
Assignee | ||
Comment 12•15 years ago
|
||
I should have moved the kInspectorTitle const out of the "Global Variables" section when I did cleanup.
Attachment #449982 -
Attachment is obsolete: true
Attachment #451795 -
Flags: review?(sdwilsh)
Attachment #449982 -
Flags: review?(sdwilsh)
Comment 13•15 years ago
|
||
Comment on attachment 451791 [details] [diff] [review]
check for content in tasksOverlay.xul (SeaMonkey) and tasksOverlay-tb.xul
r=sdwilsh
Attachment #451791 -
Flags: review?(sdwilsh) → review+
Comment 14•15 years ago
|
||
Comment on attachment 451795 [details] [diff] [review]
inspector.js, sidebar.js, tasksOverlay.xul, and tasksOverlay-tb.xul cleanup mkII
r=sdwilsh
Attachment #451795 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Updated•15 years ago
|
Attachment #451791 -
Flags: superreview?(neil)
Updated•15 years ago
|
Attachment #451791 -
Flags: superreview?(neil) → superreview+
Assignee | ||
Comment 15•15 years ago
|
||
Pushed:
http://hg.mozilla.org/dom-inspector/rev/686ee0326ae8
http://hg.mozilla.org/dom-inspector/rev/828cbd52007b
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•