Last Comment Bug 587187 - properly test for TabView being defined
: properly test for TabView being defined
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: Firefox 6
Assigned To: Raymond Lee [:raymondlee]
:
Mentors:
Depends on:
Blocks: 626527
  Show dependency treegraph
 
Reported: 2010-08-13 15:17 PDT by Ian Gilman [:iangilman]
Modified: 2011-04-17 05:52 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (590 bytes, patch)
2010-08-13 15:44 PDT, Ian Gilman [:iangilman]
dolske: review+
dolske: approval2.0+
Details | Diff | Review
v2 (1.57 KB, patch)
2011-04-13 21:32 PDT, Raymond Lee [:raymondlee]
ian: review+
ttaubert: feedback+
Details | Diff | Review
Patch for checkin (1.55 KB, patch)
2011-04-15 14:15 PDT, Raymond Lee [:raymondlee]
no flags Details | Diff | Review

Description Ian Gilman [:iangilman] 2010-08-13 15:17:40 PDT
[1:33pm] Mardak: you'll get a ReferenceError: TabView is not defined if you dont do window.TabView

This may fix bug 586818, but even if not, it's worth doing.
Comment 1 Ian Gilman [:iangilman] 2010-08-13 15:44:52 PDT
Created attachment 465872 [details] [diff] [review]
Patch v1
Comment 2 Justin Dolske [:Dolske] 2010-08-13 18:33:28 PDT
Comment on attachment 465872 [details] [diff] [review]
Patch v1

I suppose this could alternatively use |typeof TabView != "undefined"|, but whatever.
Comment 3 Ed Lee :Mardak 2010-08-13 20:10:21 PDT
http://hg.mozilla.org/mozilla-central/rev/5deb7e7751d8
Check the global object for existence to avoid ReferenceError.
Comment 4 Ed Lee :Mardak 2010-08-13 22:05:50 PDT
backed out http://hg.mozilla.org/mozilla-central/rev/c14d91f2d939
Comment 5 Dão Gottwald [:dao] 2010-08-14 02:06:28 PDT
Comment on attachment 465872 [details] [diff] [review]
Patch v1

>diff -r e49b735ae874 browser/base/content/tabbrowser.xml
>--- a/browser/base/content/tabbrowser.xml	Thu Aug 12 18:18:25 2010 -0700
>+++ b/browser/base/content/tabbrowser.xml	Fri Aug 13 15:43:27 2010 -0700
>@@ -723,7 +723,7 @@
>       <method name="updateTitlebar">
>         <body>
>           <![CDATA[
>-            if (TabView && TabView.isVisible()) {
>+            if (window.TabView && TabView.isVisible()) {

Is this going to spawn a "reference to undefined property window.TabView" (strict?) warning? ("TabView" in window && Taview...) might be better.
Comment 7 Dão Gottwald [:dao] 2010-08-15 00:08:10 PDT
reopening, see comment 5
Comment 8 Ian Gilman [:iangilman] 2011-04-01 10:11:38 PDT
Raymond, this has been languishing on my plate. Can you take care of it?
Comment 9 Raymond Lee [:raymondlee] 2011-04-13 21:32:47 PDT
Created attachment 525928 [details] [diff] [review]
v2
Comment 10 Tim Taubert [:ttaubert] 2011-04-13 21:35:27 PDT
Comment on attachment 525928 [details] [diff] [review]
v2

Looks good :)
Comment 11 Raymond Lee [:raymondlee] 2011-04-14 03:15:23 PDT
Comment on attachment 525928 [details] [diff] [review]
v2

Passed Try
http://tbpl.mozilla.org/?tree=MozillaTry&rev=51afe70f85d8
Comment 12 Ian Gilman [:iangilman] 2011-04-15 09:39:40 PDT
Comment on attachment 525928 [details] [diff] [review]
v2

Thanks!
Comment 13 Raymond Lee [:raymondlee] 2011-04-15 14:15:14 PDT
Created attachment 526379 [details] [diff] [review]
Patch for checkin

Note You need to log in before you can comment on or make changes to this bug.