Title: [151060] trunk/Source/WebKit2
- Revision
- 151060
- Author
- [email protected]
- Date
- 2013-05-31 18:39:17 -0700 (Fri, 31 May 2013)
Log Message
Fix bug in active page tracking that lead to plugins hanging during destruction
https://bugs.webkit.org/show_bug.cgi?id=117099
Reviewed by Anders Carlsson.
NPRuntimeObjectMap no longer keeps its own reference to the
throttler, and no longer reports activity during destruction.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (151059 => 151060)
--- trunk/Source/WebKit2/ChangeLog 2013-06-01 01:07:15 UTC (rev 151059)
+++ trunk/Source/WebKit2/ChangeLog 2013-06-01 01:39:17 UTC (rev 151060)
@@ -1,3 +1,20 @@
+2013-05-31 Oliver Hunt <[email protected]>
+
+ Fix bug in active page tracking that lead to plugins hanging during destruction
+ https://bugs.webkit.org/show_bug.cgi?id=117099
+
+ Reviewed by Anders Carlsson.
+
+ NPRuntimeObjectMap no longer keeps its own reference to the
+ throttler, and no longer reports activity during destruction.
+
+ * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
+ (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
+ (WebKit::NPRuntimeObjectMap::evaluate):
+ * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
+ * WebProcess/Plugins/PluginView.cpp:
+ (WebKit::PluginView::PluginView):
+
2013-05-31 Tim Horton <[email protected]>
[wk2] All intrinsic content size changes should go through the 0-delay timer
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp (151059 => 151060)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp 2013-06-01 01:07:15 UTC (rev 151059)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp 2013-06-01 01:39:17 UTC (rev 151060)
@@ -51,9 +51,8 @@
namespace WebKit {
-NPRuntimeObjectMap::NPRuntimeObjectMap(PluginView* pluginView, PageThrottler* pageThrottler)
+NPRuntimeObjectMap::NPRuntimeObjectMap(PluginView* pluginView)
: m_pluginView(pluginView)
- , m_pageThrottler(pageThrottler)
, m_finalizationTimer(RunLoop::main(), this, &NPRuntimeObjectMap::invalidateQueuedObjects)
{
}
@@ -185,11 +184,15 @@
bool NPRuntimeObjectMap::evaluate(NPObject* npObject, const String& scriptString, NPVariant* result)
{
- m_pageThrottler->reportInterestingEvent();
Strong<JSGlobalObject> globalObject(this->globalObject()->vm(), this->globalObject());
if (!globalObject)
return false;
+ if (m_pluginView && !m_pluginView->isBeingDestroyed()) {
+ if (Page* page = m_pluginView->frame()->page())
+ page->pageThrottler()->reportInterestingEvent();
+ }
+
ExecState* exec = globalObject->globalExec();
JSLockHolder lock(exec);
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h (151059 => 151060)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h 2013-06-01 01:07:15 UTC (rev 151059)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h 2013-06-01 01:39:17 UTC (rev 151060)
@@ -45,10 +45,6 @@
class JSValue;
}
-namespace WebCore {
- class PageThrottler;
-}
-
namespace WebKit {
class JSNPObject;
@@ -58,7 +54,7 @@
// A per plug-in map of NPObjects that wrap _javascript_ objects.
class NPRuntimeObjectMap : private JSC::WeakHandleOwner {
public:
- explicit NPRuntimeObjectMap(PluginView*, WebCore::PageThrottler*);
+ explicit NPRuntimeObjectMap(PluginView*);
class PluginProtector {
public:
@@ -99,7 +95,6 @@
void invalidateQueuedObjects();
PluginView* m_pluginView;
- RefPtr<WebCore::PageThrottler> m_pageThrottler;
HashMap<JSC::JSObject*, NPJSObject*> m_npJSObjects;
HashMap<NPObject*, JSC::Weak<JSNPObject>> m_jsNPObjects;
Vector<NPObject*> m_npObjectsToFinalize;
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp (151059 => 151060)
--- trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2013-06-01 01:07:15 UTC (rev 151059)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp 2013-06-01 01:39:17 UTC (rev 151060)
@@ -278,7 +278,7 @@
, m_isBeingDestroyed(false)
, m_pendingURLRequestsTimer(RunLoop::main(), this, &PluginView::pendingURLRequestsTimerFired)
#if ENABLE(NETSCAPE_PLUGIN_API)
- , m_npRuntimeObjectMap(this, m_webPage->corePage()->pageThrottler())
+ , m_npRuntimeObjectMap(this)
#endif
, m_manualStreamState(StreamStateInitial)
, m_pluginSnapshotTimer(this, &PluginView::pluginSnapshotTimerFired, pluginSnapshotTimerDelay)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes