Closed
Bug 521216
Opened 15 years ago
Closed 15 years ago
Tab is Undefined error in Error Console - Win7 Previews
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
FIXED
Firefox 3.7a1
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: jmjjeffery, Assigned: dao)
References
Details
(Keywords: verified1.9.2)
Attachments
(2 files)
(deleted),
patch
|
robarnold
:
review+
beltzner
:
approval1.9.2+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Gavin
:
review+
beltzner
:
approval1.9.2+
|
Details | Diff | Splinter Review |
This error is appearing in the Console2 Error Console:
Error: tab is undefined
Source file: file:///J:/Program%20Files%20(x86)/Minefield/modules/WindowsPreviewPerTab.jsm
Line: 514
Not sure yet of what's triggering the error. Seems it might be related to sites doing a periodic refresh of page, i.e.: msnbc perhaps.
Using an hourly build:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091007 Minefield/3.7a1pre (.NET CLR 3.5.30729) ID:20091007231829
cset: http://hg.mozilla.org/mozilla-central/rev/d8c914dbd3f8
Reporter | ||
Comment 1•15 years ago
|
||
As I clicked 'commit' while filing this bug I got the error to appear.
Assignee | ||
Comment 2•15 years ago
|
||
Rob: 'for each' shouldn't be used like this. There's no good reason to use it on arrays, and it's plain wrong on node lists. See also the warning here: <https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Statements/for_each...in#Examples>
Blocks: 474056
Component: Widget: Win32 → General
Product: Core → Firefox
QA Contact: win32 → general
Version: Trunk → 3.6 Branch
Assignee | ||
Comment 4•15 years ago
|
||
Attachment #405251 -
Flags: review?(tellrob)
Assignee | ||
Updated•15 years ago
|
OS: Windows NT → Windows 7
Comment 5•15 years ago
|
||
Comment on attachment 405251 [details] [diff] [review]
patch
Looks good. Wish I'd known that sooner!
Attachment #405251 -
Flags: review?(tellrob) → review+
Updated•15 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7a1
Assignee | ||
Updated•15 years ago
|
Attachment #405251 -
Flags: approval1.9.2?
Comment 7•15 years ago
|
||
Comment on attachment 405251 [details] [diff] [review]
patch
>@@ -367,18 +367,18 @@ XPCOMUtils.defineLazyGetter(PreviewContr
>- for each (let evtName in this.events)
>- this.tabbrowser.tabContainer.addEventListener(evtName, this, false);
>+ for (let i = 0; i < this.events.length; i++)
>+ this.tabbrowser.tabContainer.addEventListener(this.events[i], this, false);
Why not use .forEach? Is that not an actual array []?
Array.forEach(this.events, function(event) {
this.tabbrowser.tabContainer.addEventListener(event, this, false);
}, this);
Comment 8•15 years ago
|
||
Oh, it is a plain array, so this.events.forEach should work
Assignee | ||
Comment 9•15 years ago
|
||
Yes, that it would have worked as well. Since it's a one-liner (allowing me to drop the brackets) and this.events[i] appears only once, I don't think forEach would have improved the code significantly. I also wonder if forEach is actually still faster.
Reporter | ||
Comment 10•15 years ago
|
||
Ok, I just downloaded the latest hourly that should contain this patch, and I still see the error..
cset: http://hg.mozilla.org/mozilla-central/rev/542fa9413bd0
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091008 Minefield/3.7a1pre Firefox/3.7 (.NET CLR 3.5.30729) ID:20091008114812
Error: this.previews[index] is undefined
Source file: file:///J:/Program%20Files%20(x86)/Minefield/modules/WindowsPreviewPerTab.jsm
Line: 514
Reporter | ||
Comment 11•15 years ago
|
||
I can still trigger the error by simply opening a bug from history.
Or middle-clicking a link from the location bar.
Assignee | ||
Comment 12•15 years ago
|
||
Landed this to get more useful information:
http://hg.mozilla.org/mozilla-central/rev/7e78bc8c98ea
Please report back with new console output.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•15 years ago
|
||
(In reply to comment #10)
> Ok, I just downloaded the latest hourly that should contain this patch, and I
> still see the error..
>
> cset: http://hg.mozilla.org/mozilla-central/rev/542fa9413bd0
>
> Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091008
> Minefield/3.7a1pre Firefox/3.7 (.NET CLR 3.5.30729) ID:20091008114812
>
> Error: this.previews[index] is undefined
> Source file:
> file:///J:/Program%20Files%20(x86)/Minefield/modules/WindowsPreviewPerTab.jsm
> Line: 514
Did you clean the error counsel first before installing the new build?
Reporter | ||
Comment 14•15 years ago
|
||
@ cuz84d
Yes, I always clear the console2 before starting to test for bugs like this.
I just got the build with debug patch and here is the output:
1. Middle-clicked a link from the location-bar to open in a tab
Error: 13,14,14,13
Source file: file:///J:/Program%20Files%20(x86)/Minefield/modules/WindowsPreviewPerTab.jsm
Line: 517
Reporter | ||
Comment 15•15 years ago
|
||
The error seems to change, here is another from mid-click on link from location-bar drop list:
Error: 11,12,12,11
Source file: file:///J:/Program%20Files%20(x86)/Minefield/modules/WindowsPreviewPerTab.jsm
Line: 517
Assignee | ||
Comment 16•15 years ago
|
||
This might be a tabbrowser bug. I've pushed something to the tryserver for testing.
Assignee | ||
Comment 17•15 years ago
|
||
Reporter | ||
Comment 18•15 years ago
|
||
(In reply to comment #17)
> Build is here:
> https://build.mozilla.org/tryserver-builds/dgottwald@mozilla.com-try-115ca7ebbd70/try-115ca7ebbd70-win32.zip
This build is good, no errors...
Assignee | ||
Comment 19•15 years ago
|
||
So the problem is that the tabs progress listener gets notifications about the new browser before the TabOpen event is dispatched.
Reporter | ||
Comment 20•15 years ago
|
||
(In reply to comment #19)
> Created an attachment (id=405455) [details]
> tabbrowser patch
>
> So the problem is that the tabs progress listener gets notifications about the
> new browser before the TabOpen event is dispatched.
Not to butt in, but you didn't mark this for review ?
Assignee | ||
Comment 21•15 years ago
|
||
Comment on attachment 405455 [details] [diff] [review]
tabbrowser patch
passed all unit tests on the tryserver
Attachment #405455 -
Flags: review?(gavin.sharp)
Updated•15 years ago
|
Attachment #405455 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 22•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #405455 -
Flags: approval1.9.2?
Updated•15 years ago
|
Attachment #405251 -
Flags: approval1.9.2? → approval1.9.2+
Updated•15 years ago
|
Attachment #405455 -
Flags: approval1.9.2? → approval1.9.2+
Comment 23•15 years ago
|
||
Comment on attachment 405455 [details] [diff] [review]
tabbrowser patch
a192=beltzner
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 24•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/53d5343f7326
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/1e2aea110399
status1.9.2:
--- → final-fixed
Comment 25•15 years ago
|
||
why is this still checkin-needed? what's left to do?
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Comment 26•15 years ago
|
||
I had to take these on the release branch so bug 522416 would apply cleanly and I didn't have to figure out a special patch just for release branch for beta 1. If this was wrong of me to do, I'm sorry and we can back it out.
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/27d9d4fb4064
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/a5340b714f5f
Comment 27•15 years ago
|
||
Verified fixed on the 1.9.2 branch using Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2b6pre) Gecko/20100105 Namoroka/3.6b6pre. I verified by opening links from the location bar with middle clicks and opening history entries.
Keywords: verified1.9.2
You need to log in
before you can comment on or make changes to this bug.
Description
•