Title: [153616] trunk/Source/WebKit2
- Revision
- 153616
- Author
- [email protected]
- Date
- 2013-08-01 15:27:10 -0700 (Thu, 01 Aug 2013)
Log Message
Lots of leaks under WebContext::pluginInfoStoreDidLoadPlugins()
https://bugs.webkit.org/show_bug.cgi?id=119412
Reviewed by Simon Fraser.
For some sick reason, the WKContextClient plugInInformationBecameAvailable callback function
expects a +1 reference to the plug-in array. Isolate that hack to WebContextClient so that
we don't leak the array if there is no WKContextClient.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
* UIProcess/WebContextClient.cpp:
(WebKit::WebContextClient::plugInInformationBecameAvailable):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (153615 => 153616)
--- trunk/Source/WebKit2/ChangeLog 2013-08-01 22:18:58 UTC (rev 153615)
+++ trunk/Source/WebKit2/ChangeLog 2013-08-01 22:27:10 UTC (rev 153616)
@@ -1,3 +1,19 @@
+2013-08-01 Anders Carlsson <[email protected]>
+
+ Lots of leaks under WebContext::pluginInfoStoreDidLoadPlugins()
+ https://bugs.webkit.org/show_bug.cgi?id=119412
+
+ Reviewed by Simon Fraser.
+
+ For some sick reason, the WKContextClient plugInInformationBecameAvailable callback function
+ expects a +1 reference to the plug-in array. Isolate that hack to WebContextClient so that
+ we don't leak the array if there is no WKContextClient.
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
+ * UIProcess/WebContextClient.cpp:
+ (WebKit::WebContextClient::plugInInformationBecameAvailable):
+
2013-08-01 Kwang Yul Seo <[email protected]>
Remove return statement in void function
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (153615 => 153616)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2013-08-01 22:18:58 UTC (rev 153615)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2013-08-01 22:27:10 UTC (rev 153616)
@@ -1248,7 +1248,7 @@
pluginArray.append(ImmutableDictionary::adopt(map));
}
- m_client.plugInInformationBecameAvailable(this, ImmutableArray::adopt(pluginArray).leakRef());
+ m_client.plugInInformationBecameAvailable(this, ImmutableArray::adopt(pluginArray).get());
}
#endif
Modified: trunk/Source/WebKit2/UIProcess/WebContextClient.cpp (153615 => 153616)
--- trunk/Source/WebKit2/UIProcess/WebContextClient.cpp 2013-08-01 22:18:58 UTC (rev 153615)
+++ trunk/Source/WebKit2/UIProcess/WebContextClient.cpp 2013-08-01 22:27:10 UTC (rev 153616)
@@ -51,6 +51,9 @@
if (!m_client.plugInInformationBecameAvailable)
return;
+ // FIXME: The API contract expects us to hand a reference to the array here. This is wrong.
+ plugInInfo->ref();
+
m_client.plugInInformationBecameAvailable(toAPI(context), toAPI(plugInInfo), m_client.clientInfo);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes