Diff
Modified: trunk/Source/WebKit/ChangeLog (212767 => 212768)
--- trunk/Source/WebKit/ChangeLog 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/ChangeLog 2017-02-21 23:07:51 UTC (rev 212768)
@@ -1,3 +1,12 @@
+2017-02-21 Andreas Kling <[email protected]>
+
+ [iOS] Remove old WebKit1 MemoryMeasure helper.
+ <https://webkit.org/b/168675>
+
+ Reviewed by Sam Weinig.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
2017-02-21 JF Bastien <[email protected]>
Fix cmake build
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (212767 => 212768)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-02-21 23:07:51 UTC (rev 212768)
@@ -693,8 +693,6 @@
A10C1D1D18202F9C0036883A /* WebDefaultResourceLoadDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A10C1D1518202F9C0036883A /* WebDefaultResourceLoadDelegate.m */; };
A10C1D1E18202F9C0036883A /* WebDefaultUIKitDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A10C1D1618202F9C0036883A /* WebDefaultUIKitDelegate.h */; };
A10C1D1F18202F9C0036883A /* WebDefaultUIKitDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A10C1D1718202F9C0036883A /* WebDefaultUIKitDelegate.m */; };
- A10C1D3218202FC50036883A /* MemoryMeasure.h in Headers */ = {isa = PBXBuildFile; fileRef = A10C1D2318202FC50036883A /* MemoryMeasure.h */; settings = {ATTRIBUTES = (Private, ); }; };
- A10C1D3318202FC50036883A /* MemoryMeasure.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10C1D2418202FC50036883A /* MemoryMeasure.mm */; };
A10C1D3418202FC50036883A /* WebGeolocationCoreLocationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = A10C1D2518202FC50036883A /* WebGeolocationCoreLocationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
A10C1D3518202FC50036883A /* WebGeolocationCoreLocationProvider.mm in Sources */ = {isa = PBXBuildFile; fileRef = A10C1D2618202FC50036883A /* WebGeolocationCoreLocationProvider.mm */; };
A10C1D3618202FC50036883A /* WebGeolocationProviderIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = A10C1D2718202FC50036883A /* WebGeolocationProviderIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -1437,8 +1435,6 @@
A10C1D1518202F9C0036883A /* WebDefaultResourceLoadDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebDefaultResourceLoadDelegate.m; path = ios/DefaultDelegates/WebDefaultResourceLoadDelegate.m; sourceTree = SOURCE_ROOT; };
A10C1D1618202F9C0036883A /* WebDefaultUIKitDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebDefaultUIKitDelegate.h; path = ios/DefaultDelegates/WebDefaultUIKitDelegate.h; sourceTree = SOURCE_ROOT; };
A10C1D1718202F9C0036883A /* WebDefaultUIKitDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebDefaultUIKitDelegate.m; path = ios/DefaultDelegates/WebDefaultUIKitDelegate.m; sourceTree = SOURCE_ROOT; };
- A10C1D2318202FC50036883A /* MemoryMeasure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryMeasure.h; path = ios/Misc/MemoryMeasure.h; sourceTree = SOURCE_ROOT; };
- A10C1D2418202FC50036883A /* MemoryMeasure.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MemoryMeasure.mm; path = ios/Misc/MemoryMeasure.mm; sourceTree = SOURCE_ROOT; };
A10C1D2518202FC50036883A /* WebGeolocationCoreLocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGeolocationCoreLocationProvider.h; path = ios/Misc/WebGeolocationCoreLocationProvider.h; sourceTree = SOURCE_ROOT; };
A10C1D2618202FC50036883A /* WebGeolocationCoreLocationProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebGeolocationCoreLocationProvider.mm; path = ios/Misc/WebGeolocationCoreLocationProvider.mm; sourceTree = SOURCE_ROOT; };
A10C1D2718202FC50036883A /* WebGeolocationProviderIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGeolocationProviderIOS.h; path = ios/Misc/WebGeolocationProviderIOS.h; sourceTree = SOURCE_ROOT; };
@@ -2121,8 +2117,6 @@
A10C1D2018202FAF0036883A /* ios */ = {
isa = PBXGroup;
children = (
- A10C1D2318202FC50036883A /* MemoryMeasure.h */,
- A10C1D2418202FC50036883A /* MemoryMeasure.mm */,
A10C1D2518202FC50036883A /* WebGeolocationCoreLocationProvider.h */,
A10C1D2618202FC50036883A /* WebGeolocationCoreLocationProvider.mm */,
A10C1D2718202FC50036883A /* WebGeolocationProviderIOS.h */,
@@ -2942,7 +2936,6 @@
939810680824BF01008DF038 /* HIViewAdapter.h in Headers */,
939810690824BF01008DF038 /* HIWebView.h in Headers */,
1A8DED500EE88B8A00F25022 /* HostedNetscapePluginStream.h in Headers */,
- A10C1D3218202FC50036883A /* MemoryMeasure.h in Headers */,
1AAF5CEA0EDDE1FE008D883D /* NetscapePluginHostManager.h in Headers */,
1AAF5CEC0EDDE1FE008D883D /* NetscapePluginHostProxy.h in Headers */,
1AAF5CEE0EDDE1FE008D883D /* NetscapePluginInstanceProxy.h in Headers */,
@@ -3530,7 +3523,6 @@
939811000824BF01008DF038 /* HIViewAdapter.m in Sources */,
939811020824BF01008DF038 /* HIWebView.mm in Sources */,
1A8DED510EE88B8A00F25022 /* HostedNetscapePluginStream.mm in Sources */,
- A10C1D3318202FC50036883A /* MemoryMeasure.mm in Sources */,
1AAF5CEB0EDDE1FE008D883D /* NetscapePluginHostManager.mm in Sources */,
1AAF5CED0EDDE1FE008D883D /* NetscapePluginHostProxy.mm in Sources */,
1AAF5CEF0EDDE1FE008D883D /* NetscapePluginInstanceProxy.mm in Sources */,
Modified: trunk/Source/WebKit/ios/ChangeLog (212767 => 212768)
--- trunk/Source/WebKit/ios/ChangeLog 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/ios/ChangeLog 2017-02-21 23:07:51 UTC (rev 212768)
@@ -1,5 +1,19 @@
2017-02-21 Andreas Kling <[email protected]>
+ [iOS] Remove old WebKit1 MemoryMeasure helper.
+ <https://webkit.org/b/168675>
+
+ Reviewed by Sam Weinig.
+
+ Remove the MemoryMeasure logging helper from the WebKit1 days. It was using an old way
+ of measuring memory, and we were only using it in a single place anyway.
+
+ * Misc/MemoryMeasure.h: Removed.
+ * Misc/MemoryMeasure.mm: Removed.
+ * WebKit.iOS.exp:
+
+2017-02-21 Andreas Kling <[email protected]>
+
[iOS] WebKit1 should use shared memory pressure handler code.
<https://webkit.org/b/168653>
Deleted: trunk/Source/WebKit/ios/Misc/MemoryMeasure.h (212767 => 212768)
--- trunk/Source/WebKit/ios/Misc/MemoryMeasure.h 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/ios/Misc/MemoryMeasure.h 2017-02-21 23:07:51 UTC (rev 212768)
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MemoryMeasure_h
-#define MemoryMeasure_h
-
-namespace WebKit {
-
-/*!
- * A simple class that measures the difference in the resident memory of the
- * process between its contruction and destruction. It uses the mach API -
- * task_info - to figure this out.
- */
-class MemoryMeasure {
-public:
- MemoryMeasure()
- : m_logString("")
- , m_initialMemory(taskMemory())
- {
- }
-
- MemoryMeasure(const char *log)
- : m_logString(log)
- , m_initialMemory(taskMemory())
- {
- }
-
- ~MemoryMeasure();
-
- static void enableLogging(bool enabled);
- static bool isLoggingEnabled();
-
-private:
- const char *m_logString;
- long m_initialMemory;
- static bool m_isLoggingEnabled;
-
- /*!
- * @return The resident memory (in bytes) consumed by the process. It uses
- * task_info() to get this information. If there is an error, it
- * returns -1.
- */
- long taskMemory();
-};
-
-}
-#endif
Deleted: trunk/Source/WebKit/ios/Misc/MemoryMeasure.mm (212767 => 212768)
--- trunk/Source/WebKit/ios/Misc/MemoryMeasure.mm 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/ios/Misc/MemoryMeasure.mm 2017-02-21 23:07:51 UTC (rev 212768)
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if PLATFORM(IOS)
-
-#include "MemoryMeasure.h"
-
-#include <stdio.h>
-#include <mach/mach.h>
-
-static const int measureMemoryFailed = -1;
-
-namespace WebKit {
-
-bool MemoryMeasure::m_isLoggingEnabled;
-
-void MemoryMeasure::enableLogging(bool enabled)
-{
- m_isLoggingEnabled = enabled;
-}
-
-bool MemoryMeasure::isLoggingEnabled()
-{
- return m_isLoggingEnabled;
-}
-
-long MemoryMeasure::taskMemory()
-{
- if (!MemoryMeasure::isLoggingEnabled())
- return 0;
-
- task_vm_info_data_t vmInfo;
- mach_msg_type_number_t count = TASK_VM_INFO_COUNT;
- kern_return_t err = task_info(mach_task_self(), TASK_VM_INFO, (task_info_t) &vmInfo, &count);
- if (err != KERN_SUCCESS)
- return measureMemoryFailed;
-
- return (long) vmInfo.internal;
-}
-
-MemoryMeasure::~MemoryMeasure()
-{
- if (!MemoryMeasure::isLoggingEnabled())
- return;
-
- long currentMemory = taskMemory();
- if (currentMemory == measureMemoryFailed || m_initialMemory == measureMemoryFailed) {
- NSLog(@"%s (Unable to get dirty memory information for process)\n", m_logString);
- return;
- }
-
- long memoryDiff = currentMemory - m_initialMemory;
- if (memoryDiff < 0)
- NSLog(@"%s Dirty memory reduced by %ld bytes (from %ld to %ld)\n", m_logString, (memoryDiff * -1), m_initialMemory, currentMemory);
- else if (memoryDiff > 0)
- NSLog(@"%s Dirty memory increased by %ld bytes (from %ld to %ld)\n", m_logString, memoryDiff, m_initialMemory, currentMemory);
- else
- NSLog(@"%s No change in dirty memory used by process (at %ld bytes)\n", m_logString, currentMemory);
-}
-
-}
-
-#endif // PLATFORM(IOS)
Modified: trunk/Source/WebKit/ios/WebKit.iOS.exp (212767 => 212768)
--- trunk/Source/WebKit/ios/WebKit.iOS.exp 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/ios/WebKit.iOS.exp 2017-02-21 23:07:51 UTC (rev 212768)
@@ -27,13 +27,6 @@
_WebViewportShrinkToFitKey
_WebViewportWidthKey
-# So that we can use the MemoryMeasure class in MobileSafari
-__ZN6WebKit13MemoryMeasure10taskMemoryEv
-__ZN6WebKit13MemoryMeasure13enableLoggingEb
-__ZN6WebKit13MemoryMeasure16isLoggingEnabledEv
-__ZN6WebKit13MemoryMeasureD1Ev
-__ZN6WebKit13MemoryMeasureD2Ev
-
# For estimated progress notifications
_WebViewProgressBackgroundColorKey
_WebViewProgressEstimatedProgressKey
Modified: trunk/Source/WebKit/mac/ChangeLog (212767 => 212768)
--- trunk/Source/WebKit/mac/ChangeLog 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/mac/ChangeLog 2017-02-21 23:07:51 UTC (rev 212768)
@@ -1,5 +1,17 @@
2017-02-21 Andreas Kling <[email protected]>
+ [iOS] Remove old WebKit1 MemoryMeasure helper.
+ <https://webkit.org/b/168675>
+
+ Reviewed by Sam Weinig.
+
+ * Configurations/WebKitLegacy.xcconfig:
+ * Misc/WebCache.mm:
+ (+[WebCache emptyInMemoryResources]):
+ * WebView/WebView.mm:
+
+2017-02-21 Andreas Kling <[email protected]>
+
[iOS] WebKit1 should use shared memory pressure handler code.
<https://webkit.org/b/168653>
Modified: trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig (212767 => 212768)
--- trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/mac/Configurations/WebKitLegacy.xcconfig 2017-02-21 23:07:51 UTC (rev 212768)
@@ -25,7 +25,7 @@
#include "Version.xcconfig"
EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = *.defs *.nib *.pdf *.tiff CarbonUtils.* CarbonWindowAdapter.* CarbonWindowContentView.* CarbonWindowFrame.* HIViewAdapter.* HIWebView.* OutlookQuirksUserScript.js PopupMenuMac.* SearchPopupMenuMac.* WebClipView.* WebDashboardRegion.* WebDynamicScrollBarsView.* WebIconDatabase.* WebIconDatabasePrivate.* WebInspectorClient.* WebJavaScriptTextInputPanel.* WebNSEventExtras.* WebNSPasteboardExtras.* WebNSWindowExtras.* WebPanelAuthenticationHandler.* WebPluginsPrivate.* WebStringTruncator.* WebTextCompletionController.*;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.mm MemoryMeasure.h WebCaretChangeListener.h WebFixedPositionContent.h WebFrameIOS.h WebFrameIPhone.h WebGeolocationCoreLocationProvider.h WebGeolocationPrivate.h WebGeolocationProviderIOS.h WebMIMETypeRegistry.h WebNSStringExtrasIOS.h WebNSStringExtrasIPhone.h WebPDFViewIOS.h WebPDFViewIPhone.h WebPDFViewPlaceholder.h WebSelectionRect.h WebUIKitDelegate.h WebUIKitSupport.h WebVisiblePosition.h DOMHTMLTextAreaElementPrivate.h DOMUIKitExtensions.h;
+EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = *IOS.mm WebCaretChangeListener.h WebFixedPositionContent.h WebFrameIOS.h WebFrameIPhone.h WebGeolocationCoreLocationProvider.h WebGeolocationPrivate.h WebGeolocationProviderIOS.h WebMIMETypeRegistry.h WebNSStringExtrasIOS.h WebNSStringExtrasIPhone.h WebPDFViewIOS.h WebPDFViewIPhone.h WebPDFViewPlaceholder.h WebSelectionRect.h WebUIKitDelegate.h WebUIKitSupport.h WebVisiblePosition.h DOMHTMLTextAreaElementPrivate.h DOMUIKitExtensions.h;
EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH));
EXPORTED_SYMBOLS_FILE_ = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/WebKitLegacy.generated.exp;
Modified: trunk/Source/WebKit/mac/Misc/WebCache.mm (212767 => 212768)
--- trunk/Source/WebKit/mac/Misc/WebCache.mm 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/mac/Misc/WebCache.mm 2017-02-21 23:07:51 UTC (rev 212768)
@@ -41,7 +41,6 @@
#import <wtf/RunLoop.h>
#if PLATFORM(IOS)
-#import "MemoryMeasure.h"
#import "WebFrameInternal.h"
#import <WebCore/CachedImage.h>
#import <WebCore/Frame.h>
@@ -131,8 +130,6 @@
// schedule this method on the WebThread as well so as to pick up all the
// dead resources left behind after closing the WebViews
WebThreadRun(^{
- WebKit::MemoryMeasure measurer("[WebCache emptyInMemoryResources]");
-
// Toggling the cache model like this forces the cache to evict all its in-memory resources.
WebCacheModel cacheModel = [WebView _cacheModel];
[WebView _setCacheModel:WebCacheModelDocumentViewer];
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (212767 => 212768)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2017-02-21 22:57:09 UTC (rev 212767)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2017-02-21 23:07:51 UTC (rev 212768)
@@ -243,7 +243,6 @@
#import <WebCore/TextIndicatorWindow.h>
#import <WebCore/WebVideoFullscreenController.h>
#else
-#import "MemoryMeasure.h"
#import "WebCaretChangeListener.h"
#import "WebChromeClientIOS.h"
#import "WebDefaultFormDelegate.h"