Last Comment Bug 332330 - Extraneous "Open Web Location" dialog box appears when opening new window if homepage is about:blank
: Extraneous "Open Web Location" dialog box appears when opening new window if ...
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86 Windows XP
: -- major (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
http://pbx.mine.nu/wtf.png
Depends on: 338360
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-31 00:27 PST by pocemit
Modified: 2008-03-04 03:18 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Try to find url bar if its null (927 bytes, patch)
2006-03-31 07:48 PST, Dave Townsend [:mossop]
asaf: review-
Details | Diff | Splinter Review

Description pocemit 2006-03-31 00:27:09 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

There appears to be a race condition when opening new firefox window.

If a user presses "Alt+D" while opening new browser window with Ctrl+N,
if the window is still appearing, a dialog pictured at http://pbx.mine.nu/wtf.png is shown. Its the dialog which is used when Location bar is hidden.

Possible cause (from #firefox@irc):
<Mossop> gavin__: Wierd thing. gURLBar is only set in delayedStartup if the homepage is about:blank

This bug does not appear if homepage is set to a valid URL.

Reproducible: Sometimes

Steps to Reproduce:
1. Set homepage to about:blank
2. Open new window with Ctrl+N
3. Quickly press Alt+D

Actual Results:  
If Alt+D is pressed while new window opens, the dialog appears.

Expected Results:  
Nothing. Focusing of the Location bar.
Comment 1 Dave Townsend [:mossop] 2006-03-31 00:35:55 PST
The problem here is that the code to focus the location bar requires that gURLBar be set, which is only set in prepareForStartup.

For whatever reason prepareForStartup is called in BrowserStartup() when a homepage is set, but in delayedStartup() when the homepage is about:blank.

prepareForStartup is put off in an attempt to speed up the window open when it doesnt appear to be needed just yet (taken from blame comment).

I guess moving the gURLBar assignment into BrowserStartup() is the obvious fix here.
Comment 2 Dave Townsend [:mossop] 2006-03-31 07:48:15 PST
Created attachment 216841 [details] [diff] [review]
Try to find url bar if its null

This was suggested by gavin on IRC. Just try to retrieve the URL bar if its not already set.
Comment 3 Dave Townsend [:mossop] 2006-05-17 14:26:14 PDT
Comment on attachment 216841 [details] [diff] [review]
Try to find url bar if its null

As you requested on IRC, should only take moments!
Comment 4 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2006-05-17 15:08:52 PDT
Comment on attachment 216841 [details] [diff] [review]
Try to find url bar if its null

Minusing as the current hack around prepareForStartup isn't safe regardless of this patch; will you review a patch to clean this up, at least for trunk baking...
Comment 5 pocemit 2006-11-12 15:48:26 PST
guys, hello?
this is a one-line fix and its EXTREMELY annoying.
still not fixed in 1.5.0.8
Comment 6 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-11-12 16:06:59 PST
Wasn't this fixed by bug 338360?
Comment 7 pocemit 2006-11-12 16:09:07 PST
negative.
I am running 1.5.0.8 and I can easily duplicate this bug.
hit ctrl+n, alt-d quickly in sequence.
Comment 8 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-11-12 16:26:54 PST
"FIXED" in the context of bugzilla means "fixed on the trunk". This bug isn't, and won't be fixed on the 1.8.0 branch (Firefox 1.5.0.x). It could potentially be fixed for Firefox 2.0.0.x, but that's pretty unlikely. It will be fixed for Firefox 3.
Comment 9 Dave Townsend [:mossop] 2008-03-04 03:18:22 PST
Fixed by bug 338360 then

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