2011-09-13 James Simonsen <simonjam@chromium.org>
authorsimonjam@chromium.org <simonjam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Sep 2011 19:18:27 +0000 (19:18 +0000)
committersimonjam@chromium.org <simonjam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Sep 2011 19:18:27 +0000 (19:18 +0000)
        [Chromium] Ref protect element in FrameLoaderClientImpl::createPlugin
        https://bugs.webkit.org/show_bug.cgi?id=68014

        Reviewed by Nate Chapin.

        Test: plugins/destroy-during-npp-new.htm under valgrind

        * src/FrameLoaderClientImpl.cpp:
        (WebKit::FrameLoaderClientImpl::createPlugin):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@95037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/FrameLoaderClientImpl.cpp

index d497377..a0c8573 100644 (file)
@@ -1,3 +1,15 @@
+2011-09-13  James Simonsen  <simonjam@chromium.org>
+
+        [Chromium] Ref protect element in FrameLoaderClientImpl::createPlugin
+        https://bugs.webkit.org/show_bug.cgi?id=68014
+
+        Reviewed by Nate Chapin.
+
+        Test: plugins/destroy-during-npp-new.htm under valgrind
+
+        * src/FrameLoaderClientImpl.cpp:
+        (WebKit::FrameLoaderClientImpl::createPlugin):
+
 2011-09-13  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed.  Rolled DEPS.
index e24bd3a..6b17cf9 100644 (file)
@@ -1486,6 +1486,8 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
     if (!m_webFrame->client())
         return 0;
 
+    RefPtr<HTMLPlugInElement> protect(element);
+
     WebPluginParams params;
     params.url = url;
     params.mimeType = mimeType;