Closed
Bug 1268047
Opened 9 years ago
Closed 9 years ago
Change the handling of javascript: return values to align with other browsers and the updated spec
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Whiteboard: btpp-active)
Attachments
(3 files, 1 obsolete file)
8.52 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
3.21 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
7.90 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
See https://github.com/whatwg/html/pull/1107
The relevant thing is that instead of doing ToString() on the return value we should just ignore it if it's not a string already.
![]() |
Assignee | |
Comment 1•9 years ago
|
||
Attachment #8746155 -
Flags: review?(peterv)
![]() |
Assignee | |
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
![]() |
Assignee | |
Comment 2•9 years ago
|
||
Attachment #8746156 -
Flags: review?(peterv)
![]() |
Assignee | |
Comment 3•9 years ago
|
||
Attachment #8746157 -
Flags: review?(peterv)
![]() |
Assignee | |
Comment 4•9 years ago
|
||
Attachment #8746249 -
Flags: review?(peterv)
![]() |
Assignee | |
Updated•9 years ago
|
Attachment #8746156 -
Attachment is obsolete: true
Attachment #8746156 -
Flags: review?(peterv)
Updated•9 years ago
|
Whiteboard: btpp-active
Comment 5•9 years ago
|
||
Comment on attachment 8746155 [details] [diff] [review]
part 1. Some javascript:/navigation web platform test fixups
Review of attachment 8746155 [details] [diff] [review]:
-----------------------------------------------------------------
::: testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/012.html
@@ +4,5 @@
> <script src="/resources/testharnessreport.js"></script>
> <div id="log"></div>
> <iframe id="test" name="test"></iframe>
> +<!-- XXX: What is this test trying to do? It's navigating the subframe, but
> + doing a write() to _this_ document, and the "javascript:" in there it
s/in there it/in there is/
Attachment #8746155 -
Flags: review?(peterv) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8746249 [details] [diff] [review]
part 2. Change javascript: evaluation to ignore the return value if it's not a string
Review of attachment 8746249 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/jsurl/nsJSProtocolHandler.cpp
@@ +279,1 @@
> return NS_ERROR_DOM_RETVAL_UNDEFINED;
Hmm, I guess we can't just return NS_ERROR_MALFORMED_URI because nsJSChannel::AsyncOpen special-cases NS_ERROR_DOM_RETVAL_UNDEFINED? NS_ERROR_DOM_RETVAL_UNDEFINED means something returned undefined, which isn't necessarily the case here, right?
Attachment #8746249 -
Flags: review?(peterv) → review+
Updated•9 years ago
|
Attachment #8746157 -
Flags: review?(peterv) → review+
![]() |
Assignee | |
Comment 7•9 years ago
|
||
> s/in there it/in there is/
Yep, done.
> I guess we can't just return NS_ERROR_MALFORMED_URI because nsJSChannel::AsyncOpen special-cases NS_ERROR_DOM_RETVAL_UNDEFINED
Yes.
> NS_ERROR_DOM_RETVAL_UNDEFINED means something returned undefined, which isn't necessarily the case here, right?
NS_ERROR_DOM_RETVAL_UNDEFINED exists solely to make this code work. It means whatever it needs to mean here. I could rename it to NS_ERROR_JAVASCRIPT_URL_NOT_RESULTING_IN_DOCUMENT or something if you'd like.
Flags: needinfo?(peterv)
Comment 9•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a58e71d68e49
https://hg.mozilla.org/mozilla-central/rev/54892a756c68
https://hg.mozilla.org/mozilla-central/rev/44a8024b450f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
![]() |
Assignee | |
Updated•9 years ago
|
Flags: needinfo?(peterv)
![]() |
Assignee | |
Comment 10•9 years ago
|
||
Given that the spec this was based on is known-bogus (see <https://github.com/whatwg/html/issues/1895>) and apparently didn't follow other browsers _either_ (see <https://github.com/whatwg/html/pull/1107#issuecomment-253558923>) I'm going to back this out. Once the spec gets sorted out, I'll think about implementing whatever it ends up saying.
Comment 12•9 years ago
|
||
Either this bug or bug 1270349 regressed being able to upload photos to dpreview.com photography community forums. See bug 1310414.
![]() |
Assignee | |
Comment 13•7 years ago
|
||
Bug 1477821 tracks updating to the spec once that's sorted out.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•