Changeset 162188 in webkit


Ignore:
Timestamp:
Jan 16, 2014 11:19:56 PM (10 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Remove the weak pointer added to the web view in WebKitPrintOperation
https://bugs.webkit.org/show_bug.cgi?id=127098

Reviewed by Martin Robinson.

If the print operation finishes and the web view is still alive,
the weak pointer added to the view should be removed.

  • UIProcess/API/gtk/WebKitPrintOperation.cpp:

(_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r162184 r162188  
     12014-01-16  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove the weak pointer added to the web view in WebKitPrintOperation
     4        https://bugs.webkit.org/show_bug.cgi?id=127098
     5
     6        Reviewed by Martin Robinson.
     7
     8        If the print operation finishes and the web view is still alive,
     9        the weak pointer added to the view should be removed.
     10
     11        * UIProcess/API/gtk/WebKitPrintOperation.cpp:
     12        (_WebKitPrintOperationPrivate::~_WebKitPrintOperationPrivate):
     13
    1142014-01-15  Sam Weinig  <sam@webkit.org>
    215
  • trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrintOperation.cpp

    r162057 r162188  
    6666
    6767struct _WebKitPrintOperationPrivate {
     68    ~_WebKitPrintOperationPrivate()
     69    {
     70        if (webView)
     71            g_object_remove_weak_pointer(G_OBJECT(webView), reinterpret_cast<void**>(&webView));
     72    }
     73
    6874    WebKitWebView* webView;
    6975    PrintInfo::PrintMode printMode;
     
    7985static void webkitPrintOperationConstructed(GObject* object)
    8086{
    81     WebKitPrintOperation* printOperation = WEBKIT_PRINT_OPERATION(object);
    82     WebKitPrintOperationPrivate* priv = printOperation->priv;
    83 
    84     if (G_OBJECT_CLASS(webkit_print_operation_parent_class)->constructed)
    85         G_OBJECT_CLASS(webkit_print_operation_parent_class)->constructed(object);
    86 
    87     g_object_add_weak_pointer(G_OBJECT(priv->webView), (gpointer*)&priv->webView);
     87    G_OBJECT_CLASS(webkit_print_operation_parent_class)->constructed(object);
     88
     89    WebKitPrintOperationPrivate* priv = WEBKIT_PRINT_OPERATION(object)->priv;
     90    g_object_add_weak_pointer(G_OBJECT(priv->webView), reinterpret_cast<void**>(&priv->webView));
    8891}
    8992
Note: See TracChangeset for help on using the changeset viewer.