Changeset 125500 in webkit


Ignore:
Timestamp:
Aug 13, 2012 7:37:54 PM (12 years ago)
Author:
tsepez@chromium.org
Message:

[chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
https://bugs.webkit.org/show_bug.cgi?id=93283

Reviewed by Eric Seidel.

Source/WebCore:

Chromium has a refptr that needs to be NULLed at this point.

The approach is to change the client redirectDataToPlugin method(s) to expect
the possibility of a NULL argument, and the use this to clear the refptr on
the chromium platform. Other platforms can merely ignore the NULL case, thereby
maintaining the existing behaviour.

Formal testing is nearly impossible without some chrome-specific plugins.

  • html/PluginDocument.cpp:

(WebCore::PluginDocument::detach):

Source/WebKit/blackberry:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebCoreSupport/FrameLoaderClientBlackBerry.cpp:

(WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin):

Source/WebKit/chromium:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, NULLing Chromium's refptr that needs to be NULLed.

  • src/FrameLoaderClientImpl.cpp:

(WebKit::FrameLoaderClientImpl::redirectDataToPlugin):

Source/WebKit/efl:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebCoreSupport/FrameLoaderClientEfl.cpp:

(WebCore::FrameLoaderClientEfl::redirectDataToPlugin):

Source/WebKit/gtk:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebCoreSupport/FrameLoaderClientGtk.cpp:

(WebKit::FrameLoaderClient::redirectDataToPlugin):

Source/WebKit/qt:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebCoreSupport/FrameLoaderClientQt.cpp:

(WebCore::FrameLoaderClientQt::redirectDataToPlugin):

Source/WebKit/win:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::redirectDataToPlugin):

Source/WebKit/wince:

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebCoreSupport/FrameLoaderClientWinCE.cpp:

(WebKit::FrameLoaderClientWinCE::redirectDataToPlugin):

Source/WebKit/wx:

Chromium has a refptr that needs to be NULLed at this point.

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebKitSupport/FrameLoaderClientWx.cpp:

(WebCore::FrameLoaderClientWx::redirectDataToPlugin):

Source/WebKit2:

Chromium has a refptr that needs to be NULLed at this point.

Change the client redirectDataToPlugin method(s) to expect the possibility of
a NULL argument, keeping existing behaviour otherwise.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::redirectDataToPlugin):

Location:
trunk/Source
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r125498 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Chromium has a refptr that needs to be NULLed at this point.
     9       
     10        The approach is to change the client redirectDataToPlugin method(s) to expect
     11        the possibility of a NULL argument, and the use this to clear the refptr on
     12        the chromium platform.  Other platforms can merely ignore the NULL case, thereby
     13        maintaining the existing behaviour.
     14
     15        Formal testing is nearly impossible without some chrome-specific plugins.
     16
     17        * html/PluginDocument.cpp:
     18        (WebCore::PluginDocument::detach):
     19
    1202012-08-13  Eric Penner  <epenner@google.com>
    221
  • trunk/Source/WebCore/html/PluginDocument.cpp

    r97103 r125500  
    169169    // Release the plugin node so that we don't have a circular reference.
    170170    m_pluginNode = 0;
     171    if (FrameLoader* loader = frame()->loader())
     172        loader->client()->redirectDataToPlugin(0);
    171173    HTMLDocument::detach();
    172174}
  • trunk/Source/WebKit/blackberry/ChangeLog

    r125441 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, keeping existing behaviour otherwise.
     10
     11        * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
     12        (WebCore::FrameLoaderClientBlackBerry::redirectDataToPlugin):
     13
    1142012-08-13  Mike Fenton  <mifenton@rim.com>
    215
  • trunk/Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp

    r124982 r125500  
    347347void FrameLoaderClientBlackBerry::redirectDataToPlugin(Widget* pluginWidget)
    348348{
    349     ASSERT(!m_pluginView);
    350349    m_pluginView = static_cast<PluginView*>(pluginWidget);
    351     m_hasSentResponseToPlugin = false;
     350    if (pluginWidget)
     351        m_hasSentResponseToPlugin = false;
    352352}
    353353
  • trunk/Source/WebKit/chromium/ChangeLog

    r125498 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, NULLing Chromium's refptr that needs to be NULLed.
     10
     11        * src/FrameLoaderClientImpl.cpp:
     12        (WebKit::FrameLoaderClientImpl::redirectDataToPlugin):
     13
    1142012-08-13  Eric Penner  <epenner@google.com>
    215
  • trunk/Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp

    r125108 r125500  
    14911491void FrameLoaderClientImpl::redirectDataToPlugin(Widget* pluginWidget)
    14921492{
    1493     if (pluginWidget->isPluginContainer())
    1494         m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget);
    1495     ASSERT(m_pluginWidget);
     1493    ASSERT(!pluginWidget || pluginWidget->isPluginContainer());
     1494    m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget);
    14961495}
    14971496
  • trunk/Source/WebKit/efl/ChangeLog

    r125369 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, keeping existing behaviour otherwise.
     10
     11        * WebCoreSupport/FrameLoaderClientEfl.cpp:
     12        (WebCore::FrameLoaderClientEfl::redirectDataToPlugin):
     13
    1142012-08-12  Krzysztof Czech  <k.czech@samsung.com>
    215
  • trunk/Source/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r123004 r125500  
    372372void FrameLoaderClientEfl::redirectDataToPlugin(Widget* pluginWidget)
    373373{
    374     ASSERT(!m_pluginView);
    375374    m_pluginView = static_cast<PluginView*>(pluginWidget);
    376     m_hasSentResponseToPlugin = false;
     375    if (pluginWidget)
     376        m_hasSentResponseToPlugin = false;
    377377}
    378378
  • trunk/Source/WebKit/gtk/ChangeLog

    r125407 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, keeping existing behaviour otherwise.
     10
     11        * WebCoreSupport/FrameLoaderClientGtk.cpp:
     12        (WebKit::FrameLoaderClient::redirectDataToPlugin):
     13
    1142012-08-13  Martin Robinson  <mrobinson@igalia.com>
    215
  • trunk/Source/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp

    r116121 r125500  
    535535void FrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
    536536{
    537     ASSERT(!m_pluginView);
    538537    m_pluginView = static_cast<PluginView*>(pluginWidget);
    539     m_hasSentResponseToPlugin = false;
     538    if (pluginWidget)
     539        m_hasSentResponseToPlugin = false;
    540540}
    541541
  • trunk/Source/WebKit/qt/ChangeLog

    r125428 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, keeping existing behaviour otherwise.
     10
     11        * WebCoreSupport/FrameLoaderClientQt.cpp:
     12        (WebCore::FrameLoaderClientQt::redirectDataToPlugin):
     13
    1142012-08-13  Simon Hausmann  <simon.hausmann@nokia.com>
    215
  • trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r125352 r125500  
    16391639void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget)
    16401640{
    1641     ASSERT(!m_pluginView);
    16421641    m_pluginView = static_cast<PluginView*>(pluginWidget);
    1643     m_hasSentResponseToPlugin = false;
     1642    if (pluginWidget)
     1643        m_hasSentResponseToPlugin = false;
    16441644}
    16451645
  • trunk/Source/WebKit/win/ChangeLog

    r124719 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, keeping existing behaviour otherwise.
     10
     11        * WebCoreSupport/WebFrameLoaderClient.cpp:
     12        (WebFrameLoaderClient::redirectDataToPlugin):
     13
    1142012-08-05  Patrick Gansterer  <paroga@webkit.org>
    215
  • trunk/Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp

    r116121 r125500  
    886886{
    887887    // Ideally, this function shouldn't be necessary, see <rdar://problem/4852889>
    888 
    889     if (pluginWidget->isPluginView())
     888    if (!pluginWidget || pluginWidget->isPluginView())
    890889        m_manualLoader = static_cast<PluginView*>(pluginWidget);
    891890    else
  • trunk/Source/WebKit/wince/ChangeLog

    r123354 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Change the client redirectDataToPlugin method(s) to expect the possibility of
     9        a NULL argument, keeping existing behaviour otherwise.
     10
     11        * WebCoreSupport/FrameLoaderClientWinCE.cpp:
     12        (WebKit::FrameLoaderClientWinCE::redirectDataToPlugin):
     13
    1142012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
    215
  • trunk/Source/WebKit/wince/WebCoreSupport/FrameLoaderClientWinCE.cpp

    r116121 r125500  
    175175void FrameLoaderClientWinCE::redirectDataToPlugin(Widget* pluginWidget)
    176176{
    177     ASSERT(!m_pluginView);
    178177    m_pluginView = static_cast<PluginView*>(pluginWidget);
    179     m_hasSentResponseToPlugin = false;
     178    if (pluginWidget)
     179        m_hasSentResponseToPlugin = false;
    180180}
    181181
  • trunk/Source/WebKit/wx/ChangeLog

    r123354 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Chromium has a refptr that needs to be NULLed at this point.
     9       
     10        Change the client redirectDataToPlugin method(s) to expect the possibility of
     11        a NULL argument, keeping existing behaviour otherwise.
     12
     13        * WebKitSupport/FrameLoaderClientWx.cpp:
     14        (WebCore::FrameLoaderClientWx::redirectDataToPlugin):
     15
    1162012-07-23  Pierre Rossi  <pierre.rossi@gmail.com>
    217
  • trunk/Source/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp

    r116121 r125500  
    905905void FrameLoaderClientWx::redirectDataToPlugin(Widget* pluginWidget)
    906906{
    907     ASSERT(!m_pluginView);
    908907    m_pluginView = static_cast<PluginView*>(pluginWidget);
    909     m_hasSentResponseToPlugin = false;
     908    if (pluginWidget)
     909        m_hasSentResponseToPlugin = false;
    910910}
    911911
  • trunk/Source/WebKit2/ChangeLog

    r125470 r125500  
     12012-08-13  Tom Sepez  <tsepez@chromium.org>
     2
     3        [chromium] release FrameLoaderClientImpl::m_pluginWidget refptr upon Plugin Document detach.
     4        https://bugs.webkit.org/show_bug.cgi?id=93283
     5
     6        Reviewed by Eric Seidel.
     7
     8        Chromium has a refptr that needs to be NULLed at this point.
     9       
     10        Change the client redirectDataToPlugin method(s) to expect the possibility of
     11        a NULL argument, keeping existing behaviour otherwise.
     12
     13        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
     14        (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
     15
    1162012-08-13  Raphael Kubo da Costa  <rakuco@webkit.org>
    217
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

    r124622 r125500  
    13571357void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
    13581358{
    1359     ASSERT(!m_pluginView);
    1360     ASSERT(pluginWidget);
    1361    
    13621359    m_pluginView = static_cast<PluginView*>(pluginWidget);
    13631360}
Note: See TracChangeset for help on using the changeset viewer.