Changeset 142225 in webkit


Ignore:
Timestamp:
Feb 7, 2013 9:32:45 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r142212.
http://trac.webkit.org/changeset/142212
https://bugs.webkit.org/show_bug.cgi?id=109255

Causes ASSERT(!m_installed) on launch (Requested by smfr on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-07

Source/WebCore:

  • WebCore.exp.in:
  • platform/MemoryPressureHandler.cpp:

(WebCore):
(WebCore::MemoryPressureHandler::respondToMemoryPressure):

  • platform/MemoryPressureHandler.h:

(MemoryPressureHandler):

  • platform/mac/MemoryPressureHandlerMac.mm:

(WebCore::MemoryPressureHandler::respondToMemoryPressure):

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):
(WebInstallMemoryPressureHandler):

Source/WebKit2:

  • PluginProcess/PluginProcess.cpp:

(WebKit::PluginProcess::initializeProcess):
(WebKit::PluginProcess::shouldTerminate):

  • PluginProcess/PluginProcess.h:

(PluginProcess):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):

Location:
trunk/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142223 r142225  
     12013-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r142212.
     4        http://trac.webkit.org/changeset/142212
     5        https://bugs.webkit.org/show_bug.cgi?id=109255
     6
     7        Causes ASSERT(!m_installed) on launch (Requested by smfr on
     8        #webkit).
     9
     10        * WebCore.exp.in:
     11        * platform/MemoryPressureHandler.cpp:
     12        (WebCore):
     13        (WebCore::MemoryPressureHandler::respondToMemoryPressure):
     14        * platform/MemoryPressureHandler.h:
     15        (MemoryPressureHandler):
     16        * platform/mac/MemoryPressureHandlerMac.mm:
     17        (WebCore::MemoryPressureHandler::respondToMemoryPressure):
     18
    1192013-02-07  Hanyee Kim  <choco@company100.net>
    220
  • trunk/Source/WebCore/WebCore.exp.in

    r142212 r142225  
    601601__ZN7WebCore20SpaceSplitStringDataD1Ev
    602602__ZN7WebCore21BackForwardController11itemAtIndexEi
    603 __ZN7WebCore21MemoryPressureHandler13releaseMemoryEb
    604603__ZN7WebCore21MemoryPressureHandler7installEv
    605604__ZN7WebCore21NetworkStorageSession28createPrivateBrowsingSessionERKN3WTF6StringE
  • trunk/Source/WebCore/platform/MemoryPressureHandler.cpp

    r142212 r142225  
    4444
    4545#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
     46void MemoryPressureHandler::install() { }
    4647
    47 void MemoryPressureHandler::install() { }
    4848void MemoryPressureHandler::uninstall() { }
     49
    4950void MemoryPressureHandler::holdOff(unsigned) { }
     51
    5052void MemoryPressureHandler::respondToMemoryPressure() { }
    51 void MemoryPressureHandler::releaseMemory(bool) { }
    52 
    5353#endif
    5454 
  • trunk/Source/WebCore/platform/MemoryPressureHandler.h

    r142212 r142225  
    3232namespace WebCore {
    3333
    34 typedef void (*LowMemoryHandler)(bool critical);
    35 
    3634class MemoryPressureHandler {
    3735    WTF_MAKE_FAST_ALLOCATED;
     
    3937    friend MemoryPressureHandler& memoryPressureHandler();
    4038
    41     void initialize(LowMemoryHandler handler = releaseMemory)
    42     {
    43         ASSERT(!m_installed);
    44         m_lowMemoryHandler = handler;
    45         install();
    46     }
    47 
    48 private:
    4939    void install();
    5040    void uninstall();
     
    5242    void holdOff(unsigned);
    5343
     44private:
    5445    MemoryPressureHandler();
    5546    ~MemoryPressureHandler();
    5647
    5748    void respondToMemoryPressure();
    58     static void releaseMemory(bool critical);
     49    void releaseMemory(bool critical);
    5950
    6051    bool m_installed;
    6152    time_t m_lastRespondTime;
    62     LowMemoryHandler m_lowMemoryHandler;
    6353};
    6454 
  • trunk/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm

    r142212 r142225  
    135135    double startTime = monotonicallyIncreasingTime();
    136136
    137     ASSERT(m_lowMemoryHandler);
    138     m_lowMemoryHandler(false);
     137    releaseMemory(false);
    139138
    140139    unsigned holdOffTime = (monotonicallyIncreasingTime() - startTime) * s_holdOffMultiplier;
  • trunk/Source/WebKit/mac/ChangeLog

    r142212 r142225  
     12013-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r142212.
     4        http://trac.webkit.org/changeset/142212
     5        https://bugs.webkit.org/show_bug.cgi?id=109255
     6
     7        Causes ASSERT(!m_installed) on launch (Requested by smfr on
     8        #webkit).
     9
     10        * WebView/WebView.mm:
     11        (-[WebView _commonInitializationWithFrameName:groupName:]):
     12        (WebInstallMemoryPressureHandler):
     13
    1142013-02-06  Gavin Barraclough  <barraclough@apple.com>
    215
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r142212 r142225  
    820820    [[self preferences] _postPreferencesChangedAPINotification];
    821821
    822     memoryPressureHandler().initialize();
     822    memoryPressureHandler().install();
    823823
    824824    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
     
    67356735void WebInstallMemoryPressureHandler(void)
    67366736{
    6737     memoryPressureHandler().initialize();
     6737    memoryPressureHandler().install();
    67386738}
    67396739
  • trunk/Source/WebKit2/ChangeLog

    r142222 r142225  
     12013-02-07  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r142212.
     4        http://trac.webkit.org/changeset/142212
     5        https://bugs.webkit.org/show_bug.cgi?id=109255
     6
     7        Causes ASSERT(!m_installed) on launch (Requested by smfr on
     8        #webkit).
     9
     10        * PluginProcess/PluginProcess.cpp:
     11        (WebKit::PluginProcess::initializeProcess):
     12        (WebKit::PluginProcess::shouldTerminate):
     13        * PluginProcess/PluginProcess.h:
     14        (PluginProcess):
     15        * WebProcess/WebProcess.cpp:
     16        (WebKit::WebProcess::initializeWebProcess):
     17
    1182013-02-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    219
  • trunk/Source/WebKit2/PluginProcess/PluginProcess.cpp

    r142212 r142225  
    3737#include "PluginProcessProxyMessages.h"
    3838#include "WebProcessConnection.h"
    39 #include <WebCore/MemoryPressureHandler.h>
    4039#include <WebCore/NotImplemented.h>
    4140#include <WebCore/RunLoop.h>
     
    8786}
    8887
    89 void PluginProcess::lowMemoryHandler(bool)
    90 {
    91     if (shared().shouldTerminate())
    92         shared().terminate();
    93 }
    94 
    9588void PluginProcess::initializeProcess(const ChildProcessInitializationParameters& parameters)
    9689{
    9790    m_pluginPath = parameters.extraInitializationData.get("plugin-path");
    9891    platformInitializeProcess(parameters);
    99 
    100     memoryPressureHandler().initialize(lowMemoryHandler);
    10192}
    10293
     
    135126bool PluginProcess::shouldTerminate()
    136127{
    137     return m_webProcessConnections.isEmpty();
     128    ASSERT(m_webProcessConnections.isEmpty());
     129
     130    return true;
    138131}
    139132
  • trunk/Source/WebKit2/PluginProcess/PluginProcess.h

    r142212 r142225  
    109109    mach_port_t m_compositingRenderServerPort;
    110110#endif
    111 
    112     static void lowMemoryHandler(bool critical);
    113111};
    114112
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r142212 r142225  
    245245    platformInitializeWebProcess(parameters, decoder);
    246246
    247     memoryPressureHandler().initialize();
     247    memoryPressureHandler().install();
    248248
    249249    RefPtr<APIObject> injectedBundleInitializationUserData;
Note: See TracChangeset for help on using the changeset viewer.