Title: [235283] releases/WebKitGTK/webkit-2.22
Revision
235283
Author
[email protected]
Date
2018-08-24 01:06:25 -0700 (Fri, 24 Aug 2018)

Log Message

Merge r235050 - Throw an exception if window.open() gets passed a URL that cannot be parsed
https://bugs.webkit.org/show_bug.cgi?id=171656

Patch by Rob Buis <[email protected]> on 2018-08-20
Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/url/failure-expected.txt:

Source/WebCore:

Throw a SyntaxError exception when an invalid url gets passed into window.open().

Tests: imported/w3c/web-platform-tests/url/failure.html
       fast/dom/Window/open-invalid-url.html

* page/DOMWindow.cpp:
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
(WebCore::DOMWindow::showModalDialog):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* testing/Internals.cpp:
(WebCore::Internals::openDummyInspectorFrontend):

LayoutTests:

* fast/dom/Window/open-invalid-url-expected.txt:
* fast/dom/Window/open-invalid-url.html:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/ChangeLog	2018-08-24 08:06:25 UTC (rev 235283)
@@ -1,3 +1,13 @@
+2018-08-20  Rob Buis  <[email protected]>
+
+        Throw an exception if window.open() gets passed a URL that cannot be parsed
+        https://bugs.webkit.org/show_bug.cgi?id=171656
+
+        Reviewed by Darin Adler.
+
+        * fast/dom/Window/open-invalid-url-expected.txt:
+        * fast/dom/Window/open-invalid-url.html:
+
 2018-08-20  Ms2ger  <[email protected]>
 
         [SOUP] Check length before calling soup_message_body_append_buffer.

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/fast/dom/Window/open-invalid-url-expected.txt (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/fast/dom/Window/open-invalid-url-expected.txt	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/fast/dom/Window/open-invalid-url-expected.txt	2018-08-24 08:06:25 UTC (rev 235283)
@@ -1,4 +1,2 @@
-CONSOLE MESSAGE: line 1: Unable to open a window with invalid URL '/'.
-
 ALERT: PASS
 

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/fast/dom/Window/open-invalid-url.html (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/fast/dom/Window/open-invalid-url.html	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/fast/dom/Window/open-invalid-url.html	2018-08-24 08:06:25 UTC (rev 235283)
@@ -11,7 +11,7 @@
 
 var a = window.open("about:blank","moonshine")
 function mountainGoat() {
-        a.window.eval('setTimeout("alert(window.open(\'/\') ? \'FAIL\' : \'PASS\'); if (window.testRunner) testRunner.notifyDone()", 0)')
+        a.window.eval('setTimeout("try { window.open(\'/\'); alert(\'FAIL\'); } catch(ex) { alert(\'PASS\'); }; if (window.testRunner) testRunner.notifyDone()", 0)')
 }
 setTimeout("mountainGoat()", 0)
 </script>

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/ChangeLog (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/ChangeLog	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/ChangeLog	2018-08-24 08:06:25 UTC (rev 235283)
@@ -1,5 +1,14 @@
 2018-08-20  Rob Buis  <[email protected]>
 
+        Throw an exception if window.open() gets passed a URL that cannot be parsed
+        https://bugs.webkit.org/show_bug.cgi?id=171656
+
+        Reviewed by Darin Adler.
+
+        * web-platform-tests/url/failure-expected.txt:
+
+2018-08-20  Rob Buis  <[email protected]>
+
         Relax Request constructor around referrers
         https://bugs.webkit.org/show_bug.cgi?id=168649
 

Modified: releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/web-platform-tests/url/failure-expected.txt (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/web-platform-tests/url/failure-expected.txt	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/LayoutTests/imported/w3c/web-platform-tests/url/failure-expected.txt	2018-08-24 08:06:25 UTC (rev 235283)
@@ -1,84 +1,5 @@
 CONSOLE MESSAGE: line 38: Not allowed to load local resource: example:1
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL ''.
 
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL ''.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL ''.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://user:pass@/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://foo:-80/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://user@/www.example.com'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://@/www.example.com'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https:@/www.example.com'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://a:b@/www.example.com'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://@:www.example.com'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://�'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://%EF%BF%BD'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://x x:12'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://[www.google.com]/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc:// /'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://@/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://te@s:t@/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://:/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://:12/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://[/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://\/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'sc://]/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'ftp://example.com%80/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'ftp://example.com%A0/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://example.com%80/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://example.com%A0/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://0x100000000/test'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://256.0.0.1/test'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0::0::0]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0:.0]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0:0:]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0:1:2:3:4:5:6:7.0.0.0.1]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0:1.00.0.0.0]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0:1.290.0.0.0]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'https://[0:1.23.23]'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://?'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://#'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'non-special://[:80/'.
-
-CONSOLE MESSAGE: line 38: Unable to open a window with invalid URL 'http://[::127.0.0.0.1]'.
-
-
 PASS Loading data… 
 FAIL URL's href: file://example:1/ should throw assert_throws: function "() => url.href = "" did not throw
 FAIL XHR: file://example:1/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
@@ -89,27 +10,27 @@
 FAIL XHR: file://example:test/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): file://example:test/ should throw 
 FAIL Location's href: file://example:test/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): file://example:test/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): file://example:test/ should throw 
 PASS URL's href: file://example%/ should throw 
 FAIL XHR: file://example%/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): file://example%/ should throw 
 FAIL Location's href: file://example%/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): file://example%/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): file://example%/ should throw 
 PASS URL's href: file://[example]/ should throw 
 FAIL XHR: file://[example]/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): file://[example]/ should throw 
 FAIL Location's href: file://[example]/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): file://[example]/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): file://[example]/ should throw 
 PASS URL's href: http://user:pass@/ should throw 
 FAIL XHR: http://user:pass@/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://user:pass@/ should throw 
 FAIL Location's href: http://user:pass@/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://user:pass@/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://user:pass@/ should throw 
 PASS URL's href: http://foo:-80/ should throw 
 FAIL XHR: http://foo:-80/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://foo:-80/ should throw 
 FAIL Location's href: http://foo:-80/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://foo:-80/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://foo:-80/ should throw 
 PASS URL's href: http:/:@/www.example.com should throw 
 FAIL XHR: http:/:@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 FAIL sendBeacon(): http:/:@/www.example.com should throw assert_throws: function "() => self.navigator.sendBeacon(test.input)" did not throw
@@ -119,7 +40,7 @@
 FAIL XHR: http://user@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://user@/www.example.com should throw 
 FAIL Location's href: http://user@/www.example.com should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://user@/www.example.com should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://user@/www.example.com should throw 
 PASS URL's href: http:@/www.example.com should throw 
 FAIL XHR: http:@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 FAIL sendBeacon(): http:@/www.example.com should throw assert_throws: function "() => self.navigator.sendBeacon(test.input)" did not throw
@@ -134,12 +55,12 @@
 FAIL XHR: http://@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://@/www.example.com should throw 
 FAIL Location's href: http://@/www.example.com should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://@/www.example.com should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://@/www.example.com should throw 
 PASS URL's href: https:@/www.example.com should throw 
 FAIL XHR: https:@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https:@/www.example.com should throw 
 FAIL Location's href: https:@/www.example.com should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https:@/www.example.com should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https:@/www.example.com should throw 
 PASS URL's href: http:a:b@/www.example.com should throw 
 FAIL XHR: http:a:b@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 FAIL sendBeacon(): http:a:b@/www.example.com should throw assert_throws: function "() => self.navigator.sendBeacon(test.input)" did not throw
@@ -154,7 +75,7 @@
 FAIL XHR: http://a:b@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://a:b@/www.example.com should throw 
 FAIL Location's href: http://a:b@/www.example.com should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://a:b@/www.example.com should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://a:b@/www.example.com should throw 
 PASS URL's href: http::@/www.example.com should throw 
 FAIL XHR: http::@/www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 FAIL sendBeacon(): http::@/www.example.com should throw assert_throws: function "() => self.navigator.sendBeacon(test.input)" did not throw
@@ -174,155 +95,155 @@
 FAIL XHR: http://@:www.example.com should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://@:www.example.com should throw 
 FAIL Location's href: http://@:www.example.com should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://@:www.example.com should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://@:www.example.com should throw 
 PASS URL's href: https://� should throw 
 FAIL XHR: https://� should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://� should throw 
 FAIL Location's href: https://� should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://� should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://� should throw 
 PASS URL's href: https://%EF%BF%BD should throw 
 FAIL XHR: https://%EF%BF%BD should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://%EF%BF%BD should throw 
 FAIL Location's href: https://%EF%BF%BD should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://%EF%BF%BD should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://%EF%BF%BD should throw 
 PASS URL's href: https://x x:12 should throw 
 FAIL XHR: https://x x:12 should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://x x:12 should throw 
 FAIL Location's href: https://x x:12 should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://x x:12 should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://x x:12 should throw 
 PASS URL's href: http://[www.google.com]/ should throw 
 FAIL XHR: http://[www.google.com]/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://[www.google.com]/ should throw 
 FAIL Location's href: http://[www.google.com]/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://[www.google.com]/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://[www.google.com]/ should throw 
 PASS URL's href: sc://\0/ should throw 
 FAIL XHR: sc://\0/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://\0/ should throw 
 FAIL Location's href: sc://\0/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://\0/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://\0/ should throw 
 PASS URL's href: sc:// / should throw 
 FAIL XHR: sc:// / should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc:// / should throw 
 FAIL Location's href: sc:// / should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc:// / should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc:// / should throw 
 PASS URL's href: sc://@/ should throw 
 FAIL XHR: sc://@/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://@/ should throw 
 FAIL Location's href: sc://@/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://@/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://@/ should throw 
 PASS URL's href: sc://te@s:t@/ should throw 
 FAIL XHR: sc://te@s:t@/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://te@s:t@/ should throw 
 FAIL Location's href: sc://te@s:t@/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://te@s:t@/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://te@s:t@/ should throw 
 PASS URL's href: sc://:/ should throw 
 FAIL XHR: sc://:/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://:/ should throw 
 FAIL Location's href: sc://:/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://:/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://:/ should throw 
 PASS URL's href: sc://:12/ should throw 
 FAIL XHR: sc://:12/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://:12/ should throw 
 FAIL Location's href: sc://:12/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://:12/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://:12/ should throw 
 PASS URL's href: sc://[/ should throw 
 FAIL XHR: sc://[/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://[/ should throw 
 FAIL Location's href: sc://[/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://[/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://[/ should throw 
 PASS URL's href: sc://\/ should throw 
 FAIL XHR: sc://\/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://\/ should throw 
 FAIL Location's href: sc://\/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://\/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://\/ should throw 
 PASS URL's href: sc://]/ should throw 
 FAIL XHR: sc://]/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): sc://]/ should throw 
 FAIL Location's href: sc://]/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): sc://]/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): sc://]/ should throw 
 PASS URL's href: ftp://example.com%80/ should throw 
 FAIL XHR: ftp://example.com%80/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): ftp://example.com%80/ should throw 
 FAIL Location's href: ftp://example.com%80/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): ftp://example.com%80/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): ftp://example.com%80/ should throw 
 PASS URL's href: ftp://example.com%A0/ should throw 
 FAIL XHR: ftp://example.com%A0/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): ftp://example.com%A0/ should throw 
 FAIL Location's href: ftp://example.com%A0/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): ftp://example.com%A0/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): ftp://example.com%A0/ should throw 
 PASS URL's href: https://example.com%80/ should throw 
 FAIL XHR: https://example.com%80/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://example.com%80/ should throw 
 FAIL Location's href: https://example.com%80/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://example.com%80/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://example.com%80/ should throw 
 PASS URL's href: https://example.com%A0/ should throw 
 FAIL XHR: https://example.com%A0/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://example.com%A0/ should throw 
 FAIL Location's href: https://example.com%A0/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://example.com%A0/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://example.com%A0/ should throw 
 PASS URL's href: https://0x100000000/test should throw 
 FAIL XHR: https://0x100000000/test should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://0x100000000/test should throw 
 FAIL Location's href: https://0x100000000/test should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://0x100000000/test should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://0x100000000/test should throw 
 PASS URL's href: https://256.0.0.1/test should throw 
 FAIL XHR: https://256.0.0.1/test should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://256.0.0.1/test should throw 
 FAIL Location's href: https://256.0.0.1/test should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://256.0.0.1/test should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://256.0.0.1/test should throw 
 PASS URL's href: https://[0::0::0] should throw 
 FAIL XHR: https://[0::0::0] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0::0::0] should throw 
 FAIL Location's href: https://[0::0::0] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0::0::0] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0::0::0] should throw 
 PASS URL's href: https://[0:.0] should throw 
 FAIL XHR: https://[0:.0] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0:.0] should throw 
 FAIL Location's href: https://[0:.0] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0:.0] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0:.0] should throw 
 PASS URL's href: https://[0:0:] should throw 
 FAIL XHR: https://[0:0:] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0:0:] should throw 
 FAIL Location's href: https://[0:0:] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0:0:] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0:0:] should throw 
 PASS URL's href: https://[0:1:2:3:4:5:6:7.0.0.0.1] should throw 
 FAIL XHR: https://[0:1:2:3:4:5:6:7.0.0.0.1] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0:1:2:3:4:5:6:7.0.0.0.1] should throw 
 FAIL Location's href: https://[0:1:2:3:4:5:6:7.0.0.0.1] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0:1:2:3:4:5:6:7.0.0.0.1] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0:1:2:3:4:5:6:7.0.0.0.1] should throw 
 PASS URL's href: https://[0:1.00.0.0.0] should throw 
 FAIL XHR: https://[0:1.00.0.0.0] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0:1.00.0.0.0] should throw 
 FAIL Location's href: https://[0:1.00.0.0.0] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0:1.00.0.0.0] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0:1.00.0.0.0] should throw 
 PASS URL's href: https://[0:1.290.0.0.0] should throw 
 FAIL XHR: https://[0:1.290.0.0.0] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0:1.290.0.0.0] should throw 
 FAIL Location's href: https://[0:1.290.0.0.0] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0:1.290.0.0.0] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0:1.290.0.0.0] should throw 
 PASS URL's href: https://[0:1.23.23] should throw 
 FAIL XHR: https://[0:1.23.23] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): https://[0:1.23.23] should throw 
 FAIL Location's href: https://[0:1.23.23] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): https://[0:1.23.23] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): https://[0:1.23.23] should throw 
 PASS URL's href: http://? should throw 
 FAIL XHR: http://? should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://? should throw 
 FAIL Location's href: http://? should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://? should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://? should throw 
 PASS URL's href: http://# should throw 
 FAIL XHR: http://# should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://# should throw 
 FAIL Location's href: http://# should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://# should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://# should throw 
 PASS URL's href: non-special://[:80/ should throw 
 FAIL XHR: non-special://[:80/ should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): non-special://[:80/ should throw 
 FAIL Location's href: non-special://[:80/ should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): non-special://[:80/ should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): non-special://[:80/ should throw 
 PASS URL's href: http://[::127.0.0.0.1] should throw 
 FAIL XHR: http://[::127.0.0.0.1] should throw assert_throws: function "() => client.open("GET", test.input)" did not throw
 PASS sendBeacon(): http://[::127.0.0.0.1] should throw 
 FAIL Location's href: http://[::127.0.0.0.1] should throw assert_throws: function "() => self[0].location = test.input" did not throw
-FAIL window.open(): http://[::127.0.0.0.1] should throw assert_throws: function "() => self.open(test.input).close()" threw object "TypeError: null is not an object (evaluating 'self.open(test.input).close')" that is not a DOMException SyntaxError: property "code" is equal to undefined, expected 12
+PASS window.open(): http://[::127.0.0.0.1] should throw 
 

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-08-24 08:06:25 UTC (rev 235283)
@@ -1,3 +1,24 @@
+2018-08-20  Rob Buis  <[email protected]>
+
+        Throw an exception if window.open() gets passed a URL that cannot be parsed
+        https://bugs.webkit.org/show_bug.cgi?id=171656
+
+        Reviewed by Darin Adler.
+
+        Throw a SyntaxError exception when an invalid url gets passed into window.open().
+
+        Tests: imported/w3c/web-platform-tests/url/failure.html
+               fast/dom/Window/open-invalid-url.html
+
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::createWindow):
+        (WebCore::DOMWindow::open):
+        (WebCore::DOMWindow::showModalDialog):
+        * page/DOMWindow.h:
+        * page/DOMWindow.idl:
+        * testing/Internals.cpp:
+        (WebCore::Internals::openDummyInspectorFrontend):
+
 2018-08-20  Ms2ger  <[email protected]>
 
         [SOUP] Check length before calling soup_message_body_append_buffer.

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.cpp (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.cpp	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.cpp	2018-08-24 08:06:25 UTC (rev 235283)
@@ -2235,22 +2235,19 @@
     return true;
 }
 
-RefPtr<Frame> DOMWindow::createWindow(const String& urlString, const AtomicString& frameName, const WindowFeatures& windowFeatures, DOMWindow& activeWindow, Frame& firstFrame, Frame& openerFrame, const WTF::Function<void (DOMWindow&)>& prepareDialogFunction)
+ExceptionOr<RefPtr<Frame>> DOMWindow::createWindow(const String& urlString, const AtomicString& frameName, const WindowFeatures& windowFeatures, DOMWindow& activeWindow, Frame& firstFrame, Frame& openerFrame, const WTF::Function<void(DOMWindow&)>& prepareDialogFunction)
 {
     Frame* activeFrame = activeWindow.frame();
     if (!activeFrame)
-        return nullptr;
+        return RefPtr<Frame> { nullptr };
 
     Document* activeDocument = activeWindow.document();
     if (!activeDocument)
-        return nullptr;
+        return RefPtr<Frame> { nullptr };
 
     URL completedURL = urlString.isEmpty() ? URL(ParsedURLString, emptyString()) : firstFrame.document()->completeURL(urlString);
-    if (!completedURL.isEmpty() && !completedURL.isValid()) {
-        // Don't expose client code to invalid URLs.
-        activeWindow.printErrorMessage("Unable to open a window with invalid URL '" + completedURL.string() + "'.\n");
-        return nullptr;
-    }
+    if (!completedURL.isEmpty() && !completedURL.isValid())
+        return Exception { SyntaxError };
 
     // For whatever reason, Firefox uses the first frame to determine the outgoingReferrer. We replicate that behavior here.
     String referrer = SecurityPolicy::generateReferrerHeader(firstFrame.document()->referrerPolicy(), completedURL, firstFrame.loader().outgoingReferrer());
@@ -2265,7 +2262,7 @@
     bool created;
     RefPtr<Frame> newFrame = WebCore::createWindow(*activeFrame, openerFrame, WTFMove(frameLoadRequest), windowFeatures, created);
     if (!newFrame)
-        return nullptr;
+        return RefPtr<Frame> { nullptr };
 
     if (!windowFeatures.noopener)
         newFrame->loader().setOpener(&openerFrame);
@@ -2272,7 +2269,7 @@
     newFrame->page()->setOpenedByDOM();
 
     if (newFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
-        return windowFeatures.noopener ? nullptr : newFrame;
+        return windowFeatures.noopener ? RefPtr<Frame> { nullptr } : newFrame;
 
     if (prepareDialogFunction)
         prepareDialogFunction(*newFrame->document()->domWindow());
@@ -2298,23 +2295,23 @@
 
     // Navigating the new frame could result in it being detached from its page by a navigation policy delegate.
     if (!newFrame->page())
-        return nullptr;
+        return RefPtr<Frame> { nullptr };
 
-    return windowFeatures.noopener ? nullptr : newFrame;
+    return windowFeatures.noopener ? RefPtr<Frame> { nullptr } : newFrame;
 }
 
-RefPtr<WindowProxy> DOMWindow::open(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& urlString, const AtomicString& frameName, const String& windowFeaturesString)
+ExceptionOr<RefPtr<WindowProxy>> DOMWindow::open(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& urlString, const AtomicString& frameName, const String& windowFeaturesString)
 {
     if (!isCurrentlyDisplayedInFrame())
-        return nullptr;
+        return RefPtr<WindowProxy> { nullptr };
 
     auto* activeDocument = activeWindow.document();
     if (!activeDocument)
-        return nullptr;
+        return RefPtr<WindowProxy> { nullptr };
 
     auto* firstFrame = firstWindow.frame();
     if (!firstFrame)
-        return nullptr;
+        return RefPtr<WindowProxy> { nullptr };
 
 #if ENABLE(CONTENT_EXTENSIONS)
     if (firstFrame->document()
@@ -2324,7 +2321,7 @@
         ResourceLoadInfo resourceLoadInfo { firstFrame->document()->completeURL(urlString), firstFrame->mainFrame().document()->url(), ResourceType::Popup };
         for (auto& action : firstFrame->page()->userContentProvider().actionsForResourceLoad(resourceLoadInfo, *firstFrame->mainFrame().document()->loader()).first) {
             if (action.type() == ContentExtensions::ActionType::BlockLoad)
-                return nullptr;
+                return RefPtr<WindowProxy> { nullptr };
         }
     }
 #endif
@@ -2333,7 +2330,7 @@
         // Because FrameTree::findFrameForNavigation() returns true for empty strings, we must check for empty frame names.
         // Otherwise, illegitimate window.open() calls with no name will pass right through the popup blocker.
         if (frameName.isEmpty() || !m_frame->loader().findFrameForNavigation(frameName, activeDocument))
-            return nullptr;
+            return RefPtr<WindowProxy> { nullptr };
     }
 
     // Get the target frame for the special cases of _top and _parent.
@@ -2349,7 +2346,7 @@
     }
     if (targetFrame) {
         if (!activeDocument->canNavigate(targetFrame))
-            return nullptr;
+            return RefPtr<WindowProxy> { nullptr };
 
         URL completedURL = firstFrame->document()->completeURL(urlString);
 
@@ -2367,8 +2364,12 @@
         return &targetFrame->windowProxy();
     }
 
-    auto newFrame = createWindow(urlString, frameName, parseWindowFeatures(windowFeaturesString), activeWindow, *firstFrame, *m_frame);
-    return newFrame ? &newFrame->windowProxy() : nullptr;
+    auto newFrameOrException = createWindow(urlString, frameName, parseWindowFeatures(windowFeaturesString), activeWindow, *firstFrame, *m_frame);
+    if (newFrameOrException.hasException())
+        return newFrameOrException.releaseException();
+
+    auto newFrame = newFrameOrException.releaseReturnValue();
+    return newFrame ? &newFrame->windowProxy() : RefPtr<WindowProxy> { nullptr };
 }
 
 void DOMWindow::showModalDialog(const String& urlString, const String& dialogFeaturesString, DOMWindow& activeWindow, DOMWindow& firstWindow, const WTF::Function<void (DOMWindow&)>& prepareDialogFunction)
@@ -2393,7 +2394,10 @@
     if (!canShowModalDialog(*m_frame) || !firstWindow.allowPopUp())
         return;
 
-    RefPtr<Frame> dialogFrame = createWindow(urlString, emptyAtom(), parseDialogFeatures(dialogFeaturesString, screenAvailableRect(m_frame->view())), activeWindow, *firstFrame, *m_frame, prepareDialogFunction);
+    auto dialogFrameOrException = createWindow(urlString, emptyAtom(), parseDialogFeatures(dialogFeaturesString, screenAvailableRect(m_frame->view())), activeWindow, *firstFrame, *m_frame, prepareDialogFunction);
+    if (dialogFrameOrException.hasException())
+        return;
+    RefPtr<Frame> dialogFrame = dialogFrameOrException.releaseReturnValue();
     if (!dialogFrame)
         return;
     dialogFrame->page()->chrome().runModal();

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.h (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.h	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.h	2018-08-24 08:06:25 UTC (rev 235283)
@@ -159,7 +159,7 @@
     void print();
     void stop();
 
-    WEBCORE_EXPORT RefPtr<WindowProxy> open(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& urlString, const AtomicString& frameName, const String& windowFeaturesString);
+    WEBCORE_EXPORT ExceptionOr<RefPtr<WindowProxy>> open(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& urlString, const AtomicString& frameName, const String& windowFeaturesString);
 
     void showModalDialog(const String& urlString, const String& dialogFeaturesString, DOMWindow& activeWindow, DOMWindow& firstWindow, const WTF::Function<void(DOMWindow&)>& prepareDialogFunction);
 
@@ -350,7 +350,7 @@
     void frameDestroyed() final;
     void willDetachPage() final;
 
-    static RefPtr<Frame> createWindow(const String& urlString, const AtomicString& frameName, const WindowFeatures&, DOMWindow& activeWindow, Frame& firstFrame, Frame& openerFrame, const WTF::Function<void(DOMWindow&)>& prepareDialogFunction = nullptr);
+    static ExceptionOr<RefPtr<Frame>> createWindow(const String& urlString, const AtomicString& frameName, const WindowFeatures&, DOMWindow& activeWindow, Frame& firstFrame, Frame& openerFrame, const WTF::Function<void(DOMWindow&)>& prepareDialogFunction = nullptr);
     bool isInsecureScriptAccess(DOMWindow& activeWindow, const String& urlString);
 
     void resetDOMWindowProperties();

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.idl (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.idl	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/page/DOMWindow.idl	2018-08-24 08:06:25 UTC (rev 235283)
@@ -76,7 +76,7 @@
     [DoNotCheckSecurityIf=CrossOriginWindowPolicyAllow, CustomSetter] attribute WindowProxy? opener;
     [Replaceable, DoNotCheckSecurityIf=CrossOriginWindowPolicyAllow] readonly attribute WindowProxy? parent;
     [CheckSecurityForNode] readonly attribute Element? frameElement;
-    [CallWith=ActiveWindow&FirstWindow] WindowProxy? open(optional USVString url = "" optional DOMString target = "_blank", optional [TreatNullAs=EmptyString] DOMString features = "");
+    [CallWith=ActiveWindow&FirstWindow, MayThrowException] WindowProxy? open(optional USVString url = "" optional DOMString target = "_blank", optional [TreatNullAs=EmptyString] DOMString features = "");
 
     // The user agent.
     readonly attribute Navigator navigator;

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/testing/Internals.cpp (235282 => 235283)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/testing/Internals.cpp	2018-08-24 08:04:28 UTC (rev 235282)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/testing/Internals.cpp	2018-08-24 08:06:25 UTC (rev 235283)
@@ -2331,7 +2331,7 @@
 {
     auto* inspectedPage = contextDocument()->frame()->page();
     auto* window = inspectedPage->mainFrame().document()->domWindow();
-    auto frontendWindowProxy = window->open(*window, *window, url, "", "");
+    auto frontendWindowProxy = window->open(*window, *window, url, "", "").releaseReturnValue();
     m_inspectorFrontend = std::make_unique<InspectorStubFrontend>(*inspectedPage, downcast<DOMWindow>(frontendWindowProxy->window()));
     return frontendWindowProxy;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to