-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[WPE][GTK] web process leak if webkit_download_set_destination is called with empty destination #1970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
13bf26c
to
1b91174
Compare
I'm not sure if dispatching download failure is the right way to address this, maybe NetworkDataTaskClient should be somehow notified without triggering the client event. |
1b91174
to
d4364ef
Compare
What's the status of this? |
I believe the ball is on the reviewer's side. I've been waiting for a feedback. If you feel that the fix is wrong or not worth merging I'm fine with closing the PR. I don't remember all the details where it was bothering us and we likely fixed it downstream. |
Nice test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I have an alternative suggestion: let's just add a g_return_if_fail(uri[0] != '\0')
to the top of webkit_download_set_destination()
and move on? If the application wishes to cancel the download, it could just use webkit_download_cancel()
: no need to call webkit_download_set_destination()
with an empty string. That's a lot more explicit.
I'm trying to add a test for that behavior but couldn't avoid CRASH of the the test process. I modified the test the following way: g_signal_connect(download.get(), "decide-destination", G_CALLBACK(+[](WebKitDownload* download, const gchar* suggestedFilename, gpointer) {
g_test_expect_message(nullptr, G_LOG_LEVEL_CRITICAL, "*webkit_download_set_destination*");
webkit_download_set_destination(download, "");
g_test_assert_expected_messages();
return TRUE;
}), nullptr); And expected that to pass but it still crashes. I've also tried |
d4364ef
to
a37d8ab
Compare
EWS run on current version of this PR (hash a37d8ab)
|
Is the critical causing the crash? Then the test is probably running with |
I believe so, it has to do with the added
Yes, it does run with
Makes sense, I'll leave it as is then without new tests. PTAL. |
…led with empty destination https://bugs.webkit.org/show_bug.cgi?id=242217 Reviewed by Michael Catanzaro. Fail if download destination is set to "". * Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp: (webkit_download_set_destination): Canonical link: https://commits.webkit.org/256737@main
a37d8ab
to
c985acc
Compare
Committed 256737@main (c985acc): https://commits.webkit.org/256737@main Reviewed commits have been landed. Closing PR #1970 and removing active labels. |
c985acc
a37d8ab
🧪 mac-wk1