| Summary: | Setting window.location.href to an invalid URL should throw a TypeError | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||||
| Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | cdumez, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=229447 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Alex Christensen
2021-08-19 12:49:14 PDT
Created attachment 435895 [details]
Patch
Created attachment 436075 [details]
Patch
red bubbles. Created attachment 436223 [details]
Patch
Comment on attachment 436223 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436223&action=review > Source/WebCore/ChangeLog:8 > + This matches Firefox and the specification Looks like Chrome does throw an exception, right? Just not the right exception type? If so, the compatibility risk does seem low. > Source/WebCore/page/Location.cpp:281 > + return Exception { TypeError, "Invalid URL" }; nit: "Invalid URL"_s Created attachment 436235 [details]
Patch
(In reply to Chris Dumez from comment #5) > > Source/WebCore/ChangeLog:8 > > + This matches Firefox and the specification > > Looks like Chrome does throw an exception, right? Just not the right > exception type? Correct. I added this to the ChangeLog. Committed r281472 (240851@main): <https://commits.webkit.org/240851@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 436235 [details]. |