[webkit-reviews] review denied: [Bug 98009] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr : [Attachment 166441] [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr https://bugs.webkit.org/show_bug.cgi?id=98009

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 1 03:49:24 PDT 2012


Carlos Garcia Campos <cgarcia at igalia.com> has denied Claudio Saavedra
<csaavedra at igalia.com>'s request for review:
Bug 98009: [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=98009

Attachment 166441: [GTK] WebKitDownload: use more of GOwnPtr/GRefPtr
https://bugs.webkit.org/show_bug.cgi?id=98009
https://bugs.webkit.org/attachment.cgi?id=166441&action=review

------- Additional Comments from Carlos Garcia Campos <cgarcia at igalia.com>
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.


More information about the webkit-reviews mailing list