Closed
Bug 315653
Opened 19 years ago
Closed 19 years ago
[JavaScript Console error]Components.classes['@mozilla.org/typeaheadfind;1'] has no properties
Categories
(Thunderbird :: Mail Window Front End, defect, P5)
Thunderbird
Mail Window Front End
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sugar.waffle, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
2.47 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
In trunk nightly build, when the Mail account is made, and the message is done in Preview, the following messages are displayed in JavaScript Console.
JavaScript Console message:
Error: Components.classes['@mozilla.org/typeaheadfind;1'] has no properties
Source File: chrome://global/content/bindings/browser.xml
Line: 267
Bug314288 might relate.
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=mozilla/toolkit/content/widgets&command=DIFF_FRAMESET&file=browser.xml&rev2=1.81&rev1=1.80
Reproducible: Always
Windows XP SP1
version 1.6a1 (20051108)
When patch of Bug314288 is back out, this error is not displayed.
Assignee | ||
Updated•19 years ago
|
Assignee: mscott → masayuki
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Updated•19 years ago
|
Keywords: regression
Priority: -- → P5
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Component: General → Mail Window Front End
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #202377 -
Flags: review?(mconnor)
Comment 3•19 years ago
|
||
Comment on attachment 202377 [details] [diff] [review]
Patch rv1.0
>Index: toolkit/content/widgets/browser.xml
>+ var findClass =
>+ Components.classes["@mozilla.org/typeaheadfind;1"];
>+ if (!findClass)
>+ return null;
Wouldn't the following be clearer?
if (!("@mozilla.org/typeaheadfind;1" in Components.classes))
return null;
Assignee | ||
Comment 4•19 years ago
|
||
gavin:
Isn't the performance worse? We use |findClass| after the code.
Comment 5•19 years ago
|
||
If you're that worried about performance, you should do that check before the call to getTabBrowser ;). Either way, I'd guess the performance difference is negligible.
Also, shouldn't tabbrowser's "fastFind" getter have this check too? I guess TB doesn't use tabbrowser, but if it's worth adding for browser, it's probably worth adding for tabbrowser too. It kinda sucks to have to accomodate TB specifically not building this.
Comment 6•19 years ago
|
||
(Hmm, shouldn't TB not building satchel break attachFormFill called from onPageShow? Another bug, I guess.)
Assignee | ||
Comment 7•19 years ago
|
||
This fixes bug 314819 too.
Attachment #202377 -
Attachment is obsolete: true
Attachment #202836 -
Flags: review?(mconnor)
Attachment #202377 -
Flags: review?(mconnor)
Assignee | ||
Comment 8•19 years ago
|
||
Comment on attachment 202836 [details] [diff] [review]
Patch rv1.1
Oops. Sorry. This has a bug.
Attachment #202836 -
Flags: review?(mconnor) → review-
Assignee | ||
Comment 9•19 years ago
|
||
Attachment #202836 -
Attachment is obsolete: true
Attachment #202846 -
Flags: review?(mconnor)
Assignee | ||
Updated•19 years ago
|
Whiteboard: [needs review mconnor]
Comment 10•19 years ago
|
||
(In reply to comment #3)
>(From update of attachment 202377 [details] [diff] [review] [edit])
>>Index: toolkit/content/widgets/browser.xml
>
>>+ var findClass =
>>+ Components.classes["@mozilla.org/typeaheadfind;1"];
>>+ if (!findClass)
>>+ return null;
>
>Wouldn't the following be clearer?
>
>if (!("@mozilla.org/typeaheadfind;1" in Components.classes))
> return null;
>
It would also avoid a JS strict warning too, I think.
Updated•19 years ago
|
Attachment #202846 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 11•19 years ago
|
||
checked-in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [needs review mconnor]
Comment 12•19 years ago
|
||
Comment on attachment 202846 [details] [diff] [review]
Patch rv1.2
>Index: toolkit/content/widgets/browser.xml
> <method name="updatePageReport">
> <body>
> <![CDATA[
>- var n = this.parentNode;
>- while (n && n.localName != "tabbrowser")
>- n = n.parentNode;
>+ var tabBrowser = this.getTabBrowser();
>+ if (!tabBrowser || tabBrowser.mCurrentBrowser != this)
>+ return;
>
>- if (!n || n.mCurrentBrowser != this) return;
>-
> var event = document.createEvent("Events");
> event.initEvent("DOMUpdatePageReport", true, true);
> n.dispatchEvent(event);
s/n/tabBrowser/ (bug 330464)
Assignee | ||
Comment 13•19 years ago
|
||
Oops, sorry and thanks.
You need to log in
before you can comment on or make changes to this bug.
Description
•