[GTK] Crash when browsing inspector:// uri without port set
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 16:48:04 +0000 (16:48 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 16:48:04 +0000 (16:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193721

Reviewed by Michael Catanzaro.

* UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
(WebKit::RemoteInspectorProtocolHandler::handleRequest): Return
back to caller after setting the error, if no port was provided
along with the inspector URL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240338 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp

index b5d93a6..b1e9e37 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-23  Philippe Normand  <pnormand@igalia.com>
+
+        [GTK] Crash when browsing inspector:// uri without port set
+        https://bugs.webkit.org/show_bug.cgi?id=193721
+
+        Reviewed by Michael Catanzaro.
+
+        * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp:
+        (WebKit::RemoteInspectorProtocolHandler::handleRequest): Return
+        back to caller after setting the error, if no port was provided
+        along with the inspector URL.
+
 2019-01-23  David Kilzer  <ddkilzer@apple.com>
 
         Switch remaining CoreMedia soft-linking in WebKit over to CoreMediaSoftLink.{cpp,h}
index b7e6330..3e98bce 100644 (file)
@@ -92,6 +92,7 @@ void RemoteInspectorProtocolHandler::handleRequest(WebKitURISchemeRequest* reque
     if (!requestURL.port()) {
         GUniquePtr<GError> error(g_error_new_literal(WEBKIT_POLICY_ERROR, WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI, "Cannot show inspector URL: no port provided"));
         webkit_uri_scheme_request_finish_error(request, error.get());
+        return;
     }
 
     auto* webView = webkit_uri_scheme_request_get_web_view(request);