Right now we just log a console message and return null. It would be more consistent with other URL parsing APIs to throw. https://github.com/whatwg/html/issues/2490
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/66cca6c78f63989a3834b992245d1764fb85c6e4 commit 66cca6c78f63989a3834b992245d1764fb85c6e4 Author: jochen <jochen@chromium.org> Date: Tue Apr 04 13:50:54 2017 Count how often we'd throw for invalid URLs in window.open BUG= 708135 R=mkwst@chromium.org Review-Url: https://codereview.chromium.org/2798593002 Cr-Commit-Position: refs/heads/master@{#461700} [modify] https://crrev.com/66cca6c78f63989a3834b992245d1764fb85c6e4/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/66cca6c78f63989a3834b992245d1764fb85c6e4/third_party/WebKit/Source/core/page/CreateWindow.cpp [modify] https://crrev.com/66cca6c78f63989a3834b992245d1764fb85c6e4/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4451675d1f2349898d0a84cd25035296db70c6ea commit 4451675d1f2349898d0a84cd25035296db70c6ea Author: jochen <jochen@chromium.org> Date: Fri May 05 12:20:27 2017 Throw in window.open() when an invalid URL is being passed Intent to ship: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/lQ0Q2WOw8jc/NW2B83TgAgAJ BUG= 708135 R=foolip@chromium.org Review-Url: https://codereview.chromium.org/2855263004 Cr-Commit-Position: refs/heads/master@{#469626} [add] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/LayoutTests/fast/dom/Window/window-open-invalid-url.html [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/core/frame/LocalDOMWindow.h [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/core/frame/Window.idl [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/core/page/CreateWindow.cpp [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/core/page/CreateWindow.h [modify] https://crrev.com/4451675d1f2349898d0a84cd25035296db70c6ea/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
Comment 1 by bugdroid1@chromium.org
, Apr 4 2017