Skip to content

Commit

Permalink
Merge r166410 - [GTK] Running minibrowser with url crashes in debug b…
Browse files Browse the repository at this point in the history
…uild

https://bugs.webkit.org/show_bug.cgi?id=130492

Reviewed by Martin Robinson.

Use the ResourceRequest(const URL& url) constructor, instead of the
one taking a String, to call WebPageProxy::loadRequest(), so we
ensure that the passed URI is correctly constructed.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri): Create an URL out of a SoupURI and
use that to create a ResourceRequest to pass to loadRequest().
  • Loading branch information
mariospr authored and carlosgcampos committed Apr 1, 2014
1 parent ab183ed commit e89c87d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
15 changes: 15 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
2014-03-28 Mario Sanchez Prada <mario.prada@samsung.com>

[GTK] Running minibrowser with url crashes in debug build
https://bugs.webkit.org/show_bug.cgi?id=130492

Reviewed by Martin Robinson.

Use the ResourceRequest(const URL& url) constructor, instead of the
one taking a String, to call WebPageProxy::loadRequest(), so we
ensure that the passed URI is correctly constructed.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri): Create an URL out of a SoupURI and
use that to create a ResourceRequest to pass to loadRequest().

2014-03-24 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed. Race condition when closing pages with network process enabled
Expand Down
3 changes: 2 additions & 1 deletion Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
Expand Up @@ -2000,7 +2000,8 @@ void webkit_web_view_load_uri(WebKitWebView* webView, const gchar* uri)
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
g_return_if_fail(uri);

getPage(webView)->loadRequest(String::fromUTF8(uri));
GUniquePtr<SoupURI> soupURI(soup_uri_new(uri));
getPage(webView)->loadRequest(URL(soupURI.get()));
}

/**
Expand Down
14 changes: 14 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,17 @@
2014-04-01 Mario Sanchez Prada <mario.prada@samsung.com>

[GTK] Running minibrowser with url crashes in debug build
https://bugs.webkit.org/show_bug.cgi?id=130492

Reviewed by Martin Robinson.

Update "uri-scheme" test not to use invalid URIs in it, so we
don't get a mistmatch when comparing the original URI stored in
the test class with the one returned by the WebKitWebView.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextURIScheme): Update the test.

2014-03-24 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed. Race condition when closing pages with network process enabled
Expand Down
4 changes: 2 additions & 2 deletions Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp
Expand Up @@ -195,7 +195,7 @@ static void testWebContextURIScheme(URISchemeTest* test, gconstpointer)
g_assert(!strncmp(mainResourceData, kBarHTML, mainResourceDataSize));

test->registerURISchemeHandler("echo", kEchoHTMLFormat, -1, "text/html");
test->loadURI("echo:hello world");
test->loadURI("echo:hello-world");
test->waitUntilLoadFinished();
GUniquePtr<char> echoHTML(g_strdup_printf(kEchoHTMLFormat, webkit_uri_scheme_request_get_path(test->m_uriSchemeRequest.get())));
mainResourceDataSize = 0;
Expand All @@ -205,7 +205,7 @@ static void testWebContextURIScheme(URISchemeTest* test, gconstpointer)

test->registerURISchemeHandler("nomime", kBarHTML, -1, 0);
test->m_loadEvents.clear();
test->loadURI("nomime:foo bar");
test->loadURI("nomime:foo-bar");
test->waitUntilLoadFinished();
g_assert(test->m_loadEvents.contains(LoadTrackingTest::ProvisionalLoadFailed));

Expand Down

0 comments on commit e89c87d

Please sign in to comment.