Title: [87962] trunk/Source/WebKit/mac
- Revision
- 87962
- Author
- [email protected]
- Date
- 2011-06-02 16:02:28 -0700 (Thu, 02 Jun 2011)
Log Message
2011-06-02 Anders Carlsson <[email protected]>
Reviewed by Sam Weinig.
Need a way to install the memory pressure handler without initializing WebKit1
https://bugs.webkit.org/show_bug.cgi?id=61975
Add a WebInstallMemoryPressureHandler function which will install the memory pressure handler.
-[WebView WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:] will do this,
but we'd like to be able to install a memory pressure handler without creating a WebView or even
calling any WebView method since that will call +[WebView initialize].
* WebKit.exp:
* WebView/WebView.mm:
(WebInstallMemoryPressureHandler):
* WebView/WebViewPrivate.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (87961 => 87962)
--- trunk/Source/WebKit/mac/ChangeLog 2011-06-02 22:26:10 UTC (rev 87961)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-06-02 23:02:28 UTC (rev 87962)
@@ -1,3 +1,20 @@
+2011-06-02 Anders Carlsson <[email protected]>
+
+ Reviewed by Sam Weinig.
+
+ Need a way to install the memory pressure handler without initializing WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=61975
+
+ Add a WebInstallMemoryPressureHandler function which will install the memory pressure handler.
+ -[WebView WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:] will do this,
+ but we'd like to be able to install a memory pressure handler without creating a WebView or even
+ calling any WebView method since that will call +[WebView initialize].
+
+ * WebKit.exp:
+ * WebView/WebView.mm:
+ (WebInstallMemoryPressureHandler):
+ * WebView/WebViewPrivate.h:
+
2011-05-27 Stephanie Lewis <[email protected]>
Unreviewed.
Modified: trunk/Source/WebKit/mac/WebKit.exp (87961 => 87962)
--- trunk/Source/WebKit/mac/WebKit.exp 2011-06-02 22:26:10 UTC (rev 87961)
+++ trunk/Source/WebKit/mac/WebKit.exp 2011-06-02 23:02:28 UTC (rev 87962)
@@ -96,6 +96,7 @@
_WebIconNotificationUserInfoURLKey
_WebIconSmallSize
_WebInitForCarbon
+_WebInstallMemoryPressureHandler
_WebKitErrorDomain
_WebKitErrorMIMETypeKey
_WebKitErrorPlugInNameKey
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (87961 => 87962)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2011-06-02 22:26:10 UTC (rev 87961)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2011-06-02 23:02:28 UTC (rev 87962)
@@ -6393,6 +6393,11 @@
@end
+void WebInstallMemoryPressureHandler(void)
+{
+ memoryPressureHandler().install();
+}
+
#ifdef BUILDING_ON_LEOPARD
static IMP originalRecursivelyRemoveMailAttributesImp;
Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (87961 => 87962)
--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h 2011-06-02 22:26:10 UTC (rev 87961)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h 2011-06-02 23:02:28 UTC (rev 87962)
@@ -726,5 +726,16 @@
- (NSCachedURLResponse *)webView:(WebView *)sender resource:(id)identifier willCacheResponse:(NSCachedURLResponse *)response fromDataSource:(WebDataSource *)dataSource;
@end
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// This is a C function to avoid calling +[WebView initialize].
+void WebInstallMemoryPressureHandler(void);
+
+#ifdef __cplusplus
+}
+#endif
+
#undef WebNSInteger
#undef WebNSUInteger
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes