Closed
Bug 637131
Opened 15 years ago
Closed 13 years ago
Unexpected load of chrome://browser/content/browser.xul when using the Web Console (Ctrl-Maj-K)
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pere.jobs, Unassigned)
References
()
Details
(Whiteboard: [console-2])
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
Build Identifier: Mozilla/5.0 (X11; Linux i686; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
On http://ophir.lojkine.free.fr/wikipedit/, trying to call a certain function via the Web Console (Ctrl-Maj-K) makes Firefox load chrome://browser/content/browser.xul.
Reproducible: Always
Steps to Reproduce:
1.Load http://ophir.lojkine.free.fr/wikipedit/
2. Call the web console (type Ctrl-Maj-K)
3. In the web console, type "article()", and validate
Actual Results:
Loads chrome://browser/content/browser.xul in the main page.
Expected Results:
Loading http://ophir.lojkine.free.fr/wikipedit/#something
The bug only occurs with javascript functions doing something like window.location="#Something"
![]() |
||
Comment 1•15 years ago
|
||
Confirmed on
http://hg.mozilla.org/mozilla-central/rev/d708c2fa7fea
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b13pre) Gecko/20110226 Firefox/4.0b13pre ID:20110226030401
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Comment 2•15 years ago
|
||
Not unexpected, firebug lite is loaded, with this function:
this.normalizeURL=function(url){if(!url){return""
}if(url.length<255){url=url.replace(/[^\/]+\/\.\.\//,"","g");
url=url.replace(/#.*/,"");
url=url.replace(/file:\/([^\/])/g,"file:///$1");
if(url.indexOf("chrome:")==0){var m=reChromeCase.exec(url);
if(m){url="chrome://"+m[1].toLowerCase()+"/"+m[2]
}}}return url
};
A content script then calls document.location = url
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 3•15 years ago
|
||
No! This bug is not resolved! I removed firebug and the bug is still present. Please mark the bug as unresolved.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Reporter | ||
Comment 4•15 years ago
|
||
I created a simpler script to demonstrate the bug:
http://ophir.lojkine.free.fr/bug.html
Reporter | ||
Comment 5•15 years ago
|
||
Steps to Reproduce:
1.Load http://ophir.lojkine.free.fr/bug.html
2. Call the web console (type Ctrl-Maj-K)
3. In the web console, type "bug()", and validate
Actual Results:
Loads chrome://browser/content/browser.xul in the main page.
Expected Results:
Loading http://ophir.lojkine.free.fr/bug.html#
Comment 6•15 years ago
|
||
Hmm. another strange thing about this is this error when running "bug":
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004002 (NS_NOINTERFACE) [nsISupports.QueryInterface]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: chrome://browser/content/browser.js :: prepareForStartup :: line 6715" data: no]
Comment 7•15 years ago
|
||
Blake, Gavin:
this is a weird one since we are changing the location in a sandbox. Do you guys know what is happening here? window.location = "" or window.location = "#" will load browser.xul
Comment 8•15 years ago
|
||
even loading about:blank, opening a console and entering window.location = "#" causes this to happen.
nominating for blocking final.
blocking2.0: --- → ?
Comment 9•15 years ago
|
||
I agree that we need to get this fixed. On the other hand, I personally would not hold the release of Firefox 4 on this.
Thanks for the test case @pere.jobs...
Reporter | ||
Comment 10•15 years ago
|
||
I am very happy to have contributed to such a large project! It's the beauty of free software...
Updated•15 years ago
|
Summary: Unexected load of chrome://browser/content/browser.xul when using the Web Console (Ctrl-Maj-K) → Unexpected load of chrome://browser/content/browser.xul when using the Web Console (Ctrl-Maj-K)
Updated•15 years ago
|
Whiteboard: [console-2]
Comment 13•14 years ago
|
||
We just investigated this a bit more. This only happens from the Web Console's terminal, not from normal script execution.
blocking2.0: .x+ → ---
Reporter | ||
Comment 14•14 years ago
|
||
(In reply to comment #13)
> This only happens from the Web Console's
> terminal, not from normal script execution.
That's why I wrote „when using the Web Console” in the title of the bug... :)
Reporter | ||
Comment 15•14 years ago
|
||
Hey! Did you forget this bug? I would really like it to be corrected...
Comment 16•14 years ago
|
||
Hey,
Not forgotten, but this hasn't yet risen to the top of our queue unfortunately. This bug hits a corner case and there are still some common cases that we're trying to improve.
One thing I just noticed in the original report is that you're doing this:
window.location="#Something"
is the behavior any different if you do this:
window.location.hash="#Something"
?
Thanks for the ping.
Reporter | ||
Comment 17•14 years ago
|
||
I just tried window.location.hash="#Something" , and there is no problem with that.
Note: resolving bug #626993 would also resolve this bug, I imagine...
Comment 18•14 years ago
|
||
(In reply to comment #17)
> I just tried window.location.hash="#Something" , and there is no problem
> with that.
>
> Note: resolving bug #626993 would also resolve this bug, I imagine...
Yes, but as I commented there, there are valid reasons for wanting to load browser.xul into content. Just not via this side-effect. :)
Thanks for sticking with this. As Kevin suggests, it's on our radar.
Comment 19•13 years ago
|
||
This seems to have been fixed. Found during triage.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 13 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•