There are plenty of uses of raw pointers here, so let's fix a few.
Created attachment 166441 [details] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr https://bugs.webkit.org/show_bug.cgi?id=98009 Reviewed by NOBODY (OOPS!). Use more GOwnPtr/GRefPtr in WebKitDownload * webkit/webkitdownload.cpp: (webkit_download_open_stream_for_uri): Use GRefPtr for a GFile and GOwnPtr for GError. (webkit_download_set_destination_uri): Ditto. (webkit_download_received_data): Use GOwnPtr for GError.
Attachment 166441 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/gtk/ChangeLog', u'Source/Web..." exit_code: 1 Source/WebKit/gtk/webkit/webkitdownload.cpp:862: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 166441 [details] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr https://bugs.webkit.org/show_bug.cgi?id=98009 View in context: https://bugs.webkit.org/attachment.cgi?id=166441&action=review Thanks, GRefPtr increases the ref counter in the assign operator, so you need to adopt the ref to avoid it. > Source/WebKit/gtk/webkit/webkitdownload.cpp:463 > + GRefPtr<GFile> file = g_file_new_for_uri(uri); You need to adopt the ref, use GRefPtr<GFile> file = adoptGRef(g_file_new_for_uri(uri)); > Source/WebKit/gtk/webkit/webkitdownload.cpp:698 > + GRefPtr<GFile> src = g_file_new_for_uri(priv->destinationURI); > + GRefPtr<GFile> dest = g_file_new_for_uri(destination_uri); These should be adopted too. > Source/WebKit/gtk/webkit/webkitdownload.cpp:701 > + g_file_move(src.get(), dest.get(), G_FILE_COPY_BACKUP, NULL, NULL, NULL, &error.outPtr()); Use 0 instead of NULL now that you are changing this line.
Created attachment 166443 [details] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr https://bugs.webkit.org/show_bug.cgi?id=98009 Reviewed by NOBODY (OOPS!). Use more GOwnPtr/GRefPtr in WebKitDownload * webkit/webkitdownload.cpp: (webkit_download_open_stream_for_uri): Use GRefPtr for a GFile and GOwnPtr for GError. (webkit_download_set_destination_uri): Ditto. (webkit_download_received_data): Use GOwnPtr for GError.
Attachment 166443 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/gtk/ChangeLog', u'Source/Web..." exit_code: 1 Source/WebKit/gtk/webkit/webkitdownload.cpp:862: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 166443 [details] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr https://bugs.webkit.org/show_bug.cgi?id=98009 Perfect!
Comment on attachment 166443 [details] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr https://bugs.webkit.org/show_bug.cgi?id=98009 Clearing flags on attachment: 166443 Committed r130036: <http://trac.webkit.org/changeset/130036>
All reviewed patches have been landed. Closing bug.