Closed
Bug 41707
Opened 24 years ago
Closed 24 years ago
Javascript URLs don't work (WAS: Javascript bug prompts don't work)
Categories
(Core :: Networking, defect, P3)
Tracking
()
VERIFIED
FIXED
M17
People
(Reporter: akkzilla, Assigned: mscott)
References
()
Details
(Keywords: regression, Whiteboard: [nsbeta2+])
Attachments
(1 file)
776 bytes,
patch
|
Details | Diff | Splinter Review |
I have a bug prompt URL which I use all the time in 4.7 so that I don't have to wait for the bugzilla main page to load (adapted from something German sent around a while ago) but it doesn't work in mozilla: it gives an "Error loading URL" message on the console and no UI error message. See the URL field for the one I've been using. I also tried simplifying it to: javascript:{key=prompt('Bug number',''); if(key != null){document.location= 'http://bugzilla.mozilla.org/show_bug.cgi?id='+key;}} (which I like better, but the longer one is the one I've been using in 4.7 so I left that in the URL field) but that doesn't work either. This is a regression: this bookmark worked in mozilla a few months ago.
Reporter | ||
Comment 1•24 years ago
|
||
Keyword: regression. Also adding nsbeta2 because while it isn't really dogfood, the lack of this makes bugzilla access a lot more painful and this may also point to a problem that might cause problems on heavily JS-oriented sites.
Keywords: nsbeta2,
regression
Comment 3•24 years ago
|
||
UPDATE: Using Mozilla debug Linux and Windows builds made on 06/21/00, 06/20/00, I can't even get this simple JavaScript URL to work: javascript: {alert('Hello');} Steps to reproduce: 1. Bring up Mozilla with some http:// URL 2. Type in the above JavaScript URL and hit Enter Expected result: the alert should come up (as it does in NN4.x and IE4) Actual Result: the alert does not come up. In the JavaScript console: Entry at index 0 is javascript: alert('Hello'); JavaScript error: line 0: Enabling Quirk StyleSheet Document: Done (0.594 secs) "Error loading URL javascript: alert('Hello');" If I launch Mozilla from the console and pass the JavaScript URL DIRECTLY to it as an argument, like this: ./mozilla "javascript: alert('Hello');" the alert DOES come up! Once the alert is dismissed, however, we see this again in the console: "Error loading URL javascript: alert('Hello');" We do not see the other error above, however: "JavaScript error: line 0: "
Comment 4•24 years ago
|
||
Note: is this bug a dup of bug 34217?
Summary: Javascript bug prompts don't work → Javascript URLs don't work (WAS: Javascript bug prompts don't work)
Comment 5•24 years ago
|
||
Reassigning to Networking (as in bug 34217)
Assignee: rogerl → gagan
Component: Javascript Engine → Networking
QA Contact: pschwartau → tever
Comment 6•24 years ago
|
||
Also compare bug 37463 (lockup/freeze upon javascript: Window.Location = etc.)
this might be a dup/regression of bug 34217. I would let warren confirm that...
Assignee: gagan → warren
Comment 9•24 years ago
|
||
Have you tried to reproduce this? I think it's fixed.
Assignee: warren → gagan
Reporter | ||
Comment 10•24 years ago
|
||
Not fixed as of 6/26: the prompt comes up, I type in the bug number, and the app freezes and has to be killed.
Comment 11•24 years ago
|
||
*** Bug 43918 has been marked as a duplicate of this bug. ***
Comment 12•24 years ago
|
||
*** Bug 43786 has been marked as a duplicate of this bug. ***
Comment 13•24 years ago
|
||
warren: this still happens. giving this to mscott per your suggestion.
Assignee: gagan → mscott
Comment 14•24 years ago
|
||
I fixed a bug that was recently introduced in the file transport that was preventing the "retval undefined" error from being returned to the consumer, but looking through the doc loader / docshell code, it only appears this error is checked in one place -- after the NS_OpenURI call which seems wrong. It needs to be checked in OnStartRequest before the current document is torn down. This used to work -- I remember fixing it. I'm guessing Travis broke it somewhere along the line.
Assignee | ||
Comment 15•24 years ago
|
||
Thanks for the heads up warren. I'll take a look at adding the check in the on start request for the uri loader.
Target Milestone: --- → M17
Assignee | ||
Comment 16•24 years ago
|
||
Assignee | ||
Comment 17•24 years ago
|
||
This turned out to be very easy. Warren or gagan, can one of you guys review the fix for me? I have a method which detects if I should supress the on start (or on stop, on data avaiable) calls called ProcessCanceledCase. I just expanded it to check if we received NS_ERROR_DOM_RETVAL_UNDEFINED as well. Akkana's JS url example works for me after this change.
Assignee | ||
Comment 18•24 years ago
|
||
I've checked in the uriloader fix for this. it fixes Akkana's javascript url example. However, many urls still don't work because of 43652. I have a fix in that bug that I'm waiting on a code review for then I'll check that in too.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 19•24 years ago
|
||
JavaScript URLs are still broken - Steps to reproduce: see my comments above from 2000-06-22. Using Mozilla tip builds 07/11/2000 on WinNT, Linux, and Mac0S9.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 20•24 years ago
|
||
We may need to open a new bug on the JS engine for this. All of this worked on 7/6 when I landed the fix. Something broke between then and today's bits. It looks like the problem has nothing to do with the uriloader (which was the problem with this bug originally). The return value is getting processed properly. Everything looks good except for the actual execution of the JS.
Assignee | ||
Comment 21•24 years ago
|
||
In fact it seems like the JS engine is just failing to do complex JS things like bringing up alert and prompt dialogs. I'm able to do simple stuff like javascript:('foo');
Comment 22•24 years ago
|
||
It doesn't look like an Engine problem: notice this comment from 6/22. This is still occurring now. If the Engine were incapable of bringing up alerts, this wouldn't work, but it does. It makes it seem that the part of the browser responsible for delivering commands from the URL bar to the engine is not working properly. "If I launch Mozilla from the console and pass the JavaScript URL DIRECTLY to it as an argument, like this: ./mozilla "javascript: alert('Hello');" the alert DOES come up! Once the alert is dismissed, however, we see this again in the console: "Error loading URL javascript: alert('Hello');" We do not see the other error above, however: "JavaScript error: line 0: "
Assignee | ||
Comment 23•24 years ago
|
||
there's a JS principals problem with javascript urls typed into the urlbar which was recently exposed. That is what's causing this problem. I have a fix and am getting it reviewed by the JS security team now. Instead of filing a new bug I'm just going to use this one.
Assignee | ||
Comment 24•24 years ago
|
||
I checked in a fix for the owner problem where JS and data urls entered in the urlbar were not getting the owner set on them correctly. This prevented the alert test from working because the url didn't have the right principals set on it. mstoltz reviewed the fix. Please ignore the warning: "Error loading URL javascript: alert('Hello');" That's bogus. The way we run JS urls, we end up canceling them after they start loading. Someone is reporting a false warning about an error on the load because we cancel it. The test cases in this bug now work again.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 25•24 years ago
|
||
verified: Linux 2000071308 winNT 2000071308 Mac os8.6 2000071308
Status: RESOLVED → VERIFIED
Comment 26•24 years ago
|
||
*** Bug 43786 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•