[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 11:18:15 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 473d7ff88c7c76160ef9a2a0fe5c149649806fe6
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jul 17 20:47:28 2010 +0000
Stop all NPStreams before destroying a plug-in
https://bugs.webkit.org/show_bug.cgi?id=42504
Reviewed by Dan Bernstein.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::stopAllStreams):
Go through all streams and stop them.
(WebKit::NetscapePlugin::destroy):
Call stopAllStreams.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add stopAllStreams.
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
Make stop public.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index cc3f1b8..8b191c5 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,26 @@
Reviewed by Dan Bernstein.
+ Stop all NPStreams before destroying a plug-in
+ https://bugs.webkit.org/show_bug.cgi?id=42504
+
+ * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+ (WebKit::NetscapePlugin::stopAllStreams):
+ Go through all streams and stop them.
+
+ (WebKit::NetscapePlugin::destroy):
+ Call stopAllStreams.
+
+ * WebProcess/Plugins/Netscape/NetscapePlugin.h:
+ Add stopAllStreams.
+
+ * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
+ Make stop public.
+
+2010-07-17 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Dan Bernstein.
+
Open streams should not keep a plug-in view alive
https://bugs.webkit.org/show_bug.cgi?id=42503
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
index e2c5272..05089c8 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
@@ -230,6 +230,15 @@ NetscapePluginStream* NetscapePlugin::streamFromID(uint64_t streamID)
return m_streams.get(streamID).get();
}
+void NetscapePlugin::stopAllStreams()
+{
+ Vector<RefPtr<NetscapePluginStream> > streams;
+ copyValuesToVector(m_streams, streams);
+
+ for (size_t i = 0; i < streams.size(); ++i)
+ streams[i]->stop(NPRES_USER_BREAK);
+}
+
bool NetscapePlugin::initialize(PluginController* pluginController, const Parameters& parameters)
{
ASSERT(!m_pluginController);
@@ -288,6 +297,9 @@ void NetscapePlugin::destroy()
{
ASSERT(m_isStarted);
+ // Stop all streams.
+ stopAllStreams();
+
NPP_Destroy(0);
m_isStarted = false;
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
index e13fde6..1b2ea63 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
@@ -79,6 +79,8 @@ private:
bool platformPostInitialize();
void platformPaint(WebCore::GraphicsContext*, const WebCore::IntRect& dirtyRect);
+ void stopAllStreams();
+
// Plugin
virtual bool initialize(PluginController*, const Parameters&);
virtual void destroy();
diff --git a/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h b/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h
index c5ddecc..f90c5d3 100644
--- a/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h
+++ b/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.h
@@ -61,6 +61,7 @@ public:
void sendJavaScriptStream(const WebCore::String& requestURLString, const WebCore::String& result);
+ void stop(NPReason);
NPError destroy(NPReason);
private:
@@ -68,7 +69,6 @@ private:
bool start(const WebCore::String& responseURLString, uint32_t streamLength,
uint32_t lastModifiedTime, const WebCore::String& mimeType, const WebCore::String& headers);
- void stop(NPReason);
void cancel();
void notifyAndDestroyStream(NPReason);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list