- a/Source/WebCore/ChangeLog +18 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2013-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
1
2013-02-07  Hanyee Kim  <choco@company100.net>
19
2013-02-07  Hanyee Kim  <choco@company100.net>
2
20
3
        NamedFlowCollection should be a ContextDestructionObserver
21
        NamedFlowCollection should be a ContextDestructionObserver
- a/Source/WebKit/mac/ChangeLog +13 lines
Lines 1-3 a/Source/WebKit/mac/ChangeLog_sec1
1
2013-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
1
2013-02-06  Gavin Barraclough  <barraclough@apple.com>
14
2013-02-06  Gavin Barraclough  <barraclough@apple.com>
2
15
3
        PluginProcess should quit immediately if idle in response to low-memory notifications
16
        PluginProcess should quit immediately if idle in response to low-memory notifications
- a/Source/WebKit2/ChangeLog +17 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2013-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
1
2013-02-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
18
2013-02-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
19
3
        [EFL][WK2] Remove dead code after r142169
20
        [EFL][WK2] Remove dead code after r142169
- a/Source/WebCore/WebCore.exp.in -1 lines
Lines 600-606 __ZN7WebCore20makeRGBA32FromFloatsEffff a/Source/WebCore/WebCore.exp.in_sec1
600
__ZN7WebCore20protocolIsJavaScriptERKN3WTF6StringE
600
__ZN7WebCore20protocolIsJavaScriptERKN3WTF6StringE
601
__ZN7WebCore20SpaceSplitStringDataD1Ev
601
__ZN7WebCore20SpaceSplitStringDataD1Ev
602
__ZN7WebCore21BackForwardController11itemAtIndexEi
602
__ZN7WebCore21BackForwardController11itemAtIndexEi
603
__ZN7WebCore21MemoryPressureHandler13releaseMemoryEb
604
__ZN7WebCore21MemoryPressureHandler7installEv
603
__ZN7WebCore21MemoryPressureHandler7installEv
605
__ZN7WebCore21NetworkStorageSession28createPrivateBrowsingSessionERKN3WTF6StringE
604
__ZN7WebCore21NetworkStorageSession28createPrivateBrowsingSessionERKN3WTF6StringE
606
__ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS_13PlatformEvent4TypeEb
605
__ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS_13PlatformEvent4TypeEb
- a/Source/WebCore/platform/MemoryPressureHandler.cpp -3 / +3 lines
Lines 43-55 MemoryPressureHandler::MemoryPressureHandler() a/Source/WebCore/platform/MemoryPressureHandler.cpp_sec1
43
}
43
}
44
44
45
#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
45
#if !PLATFORM(MAC) || PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
46
47
void MemoryPressureHandler::install() { }
46
void MemoryPressureHandler::install() { }
47
48
void MemoryPressureHandler::uninstall() { }
48
void MemoryPressureHandler::uninstall() { }
49
49
void MemoryPressureHandler::holdOff(unsigned) { }
50
void MemoryPressureHandler::holdOff(unsigned) { }
50
void MemoryPressureHandler::respondToMemoryPressure() { }
51
void MemoryPressureHandler::releaseMemory(bool) { }
52
51
52
void MemoryPressureHandler::respondToMemoryPressure() { }
53
#endif
53
#endif
54
 
54
 
55
} // namespace WebCore
55
} // namespace WebCore
- a/Source/WebCore/platform/MemoryPressureHandler.h -12 / +2 lines
Lines 31-65 a/Source/WebCore/platform/MemoryPressureHandler.h_sec1
31
31
32
namespace WebCore {
32
namespace WebCore {
33
33
34
typedef void (*LowMemoryHandler)(bool critical);
35
36
class MemoryPressureHandler {
34
class MemoryPressureHandler {
37
    WTF_MAKE_FAST_ALLOCATED;
35
    WTF_MAKE_FAST_ALLOCATED;
38
public:
36
public:
39
    friend MemoryPressureHandler& memoryPressureHandler();
37
    friend MemoryPressureHandler& memoryPressureHandler();
40
38
41
    void initialize(LowMemoryHandler handler = releaseMemory)
42
    {
43
        ASSERT(!m_installed);
44
        m_lowMemoryHandler = handler;
45
        install();
46
    }
47
48
private:
49
    void install();
39
    void install();
50
    void uninstall();
40
    void uninstall();
51
41
52
    void holdOff(unsigned);
42
    void holdOff(unsigned);
53
43
44
private:
54
    MemoryPressureHandler();
45
    MemoryPressureHandler();
55
    ~MemoryPressureHandler();
46
    ~MemoryPressureHandler();
56
47
57
    void respondToMemoryPressure();
48
    void respondToMemoryPressure();
58
    static void releaseMemory(bool critical);
49
    void releaseMemory(bool critical);
59
50
60
    bool m_installed;
51
    bool m_installed;
61
    time_t m_lastRespondTime;
52
    time_t m_lastRespondTime;
62
    LowMemoryHandler m_lowMemoryHandler;
63
};
53
};
64
 
54
 
65
// Function to obtain the global memory pressure object.
55
// Function to obtain the global memory pressure object.
- a/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm -2 / +1 lines
Lines 134-141 void MemoryPressureHandler::respondToMemoryPressure() a/Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm_sec1
134
134
135
    double startTime = monotonicallyIncreasingTime();
135
    double startTime = monotonicallyIncreasingTime();
136
136
137
    ASSERT(m_lowMemoryHandler);
137
    releaseMemory(false);
138
    m_lowMemoryHandler(false);
139
138
140
    unsigned holdOffTime = (monotonicallyIncreasingTime() - startTime) * s_holdOffMultiplier;
139
    unsigned holdOffTime = (monotonicallyIncreasingTime() - startTime) * s_holdOffMultiplier;
141
140
- a/Source/WebKit/mac/WebView/WebView.mm -2 / +2 lines
Lines 819-825 static bool shouldRespectPriorityInCSSAttributeSetters() a/Source/WebKit/mac/WebView/WebView.mm_sec1
819
    [self _preferencesChanged:[self preferences]];
819
    [self _preferencesChanged:[self preferences]];
820
    [[self preferences] _postPreferencesChangedAPINotification];
820
    [[self preferences] _postPreferencesChangedAPINotification];
821
821
822
    memoryPressureHandler().initialize();
822
    memoryPressureHandler().install();
823
823
824
    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
824
    if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_LOCAL_RESOURCE_SECURITY_RESTRICTION)) {
825
        // Originally, we allowed all local loads.
825
        // Originally, we allowed all local loads.
Lines 6734-6740 static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity a/Source/WebKit/mac/WebView/WebView.mm_sec2
6734
6734
6735
void WebInstallMemoryPressureHandler(void)
6735
void WebInstallMemoryPressureHandler(void)
6736
{
6736
{
6737
    memoryPressureHandler().initialize();
6737
    memoryPressureHandler().install();
6738
}
6738
}
6739
6739
6740
#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
6740
#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
- a/Source/WebKit2/PluginProcess/PluginProcess.cpp -10 / +3 lines
Lines 36-42 a/Source/WebKit2/PluginProcess/PluginProcess.cpp_sec1
36
#include "PluginProcessCreationParameters.h"
36
#include "PluginProcessCreationParameters.h"
37
#include "PluginProcessProxyMessages.h"
37
#include "PluginProcessProxyMessages.h"
38
#include "WebProcessConnection.h"
38
#include "WebProcessConnection.h"
39
#include <WebCore/MemoryPressureHandler.h>
40
#include <WebCore/NotImplemented.h>
39
#include <WebCore/NotImplemented.h>
41
#include <WebCore/RunLoop.h>
40
#include <WebCore/RunLoop.h>
42
41
Lines 86-103 PluginProcess::~PluginProcess() a/Source/WebKit2/PluginProcess/PluginProcess.cpp_sec2
86
{
85
{
87
}
86
}
88
87
89
void PluginProcess::lowMemoryHandler(bool)
90
{
91
    if (shared().shouldTerminate())
92
        shared().terminate();
93
}
94
95
void PluginProcess::initializeProcess(const ChildProcessInitializationParameters& parameters)
88
void PluginProcess::initializeProcess(const ChildProcessInitializationParameters& parameters)
96
{
89
{
97
    m_pluginPath = parameters.extraInitializationData.get("plugin-path");
90
    m_pluginPath = parameters.extraInitializationData.get("plugin-path");
98
    platformInitializeProcess(parameters);
91
    platformInitializeProcess(parameters);
99
100
    memoryPressureHandler().initialize(lowMemoryHandler);
101
}
92
}
102
93
103
void PluginProcess::removeWebProcessConnection(WebProcessConnection* webProcessConnection)
94
void PluginProcess::removeWebProcessConnection(WebProcessConnection* webProcessConnection)
Lines 134-140 NetscapePluginModule* PluginProcess::netscapePluginModule() a/Source/WebKit2/PluginProcess/PluginProcess.cpp_sec3
134
125
135
bool PluginProcess::shouldTerminate()
126
bool PluginProcess::shouldTerminate()
136
{
127
{
137
    return m_webProcessConnections.isEmpty();
128
    ASSERT(m_webProcessConnections.isEmpty());
129
130
    return true;
138
}
131
}
139
132
140
void PluginProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder)
133
void PluginProcess::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder)
- a/Source/WebKit2/PluginProcess/PluginProcess.h -2 lines
Lines 108-115 private: a/Source/WebKit2/PluginProcess/PluginProcess.h_sec1
108
    // The Mach port used for accelerated compositing.
108
    // The Mach port used for accelerated compositing.
109
    mach_port_t m_compositingRenderServerPort;
109
    mach_port_t m_compositingRenderServerPort;
110
#endif
110
#endif
111
112
    static void lowMemoryHandler(bool critical);
113
};
111
};
114
112
115
} // namespace WebKit
113
} // namespace WebKit
- a/Source/WebKit2/WebProcess/WebProcess.cpp -1 / +1 lines
Lines 244-250 void WebProcess::initializeWebProcess(const WebProcessCreationParameters& parame a/Source/WebKit2/WebProcess/WebProcess.cpp_sec1
244
244
245
    platformInitializeWebProcess(parameters, decoder);
245
    platformInitializeWebProcess(parameters, decoder);
246
246
247
    memoryPressureHandler().initialize();
247
    memoryPressureHandler().install();
248
248
249
    RefPtr<APIObject> injectedBundleInitializationUserData;
249
    RefPtr<APIObject> injectedBundleInitializationUserData;
250
    InjectedBundleUserMessageDecoder messageDecoder(injectedBundleInitializationUserData);
250
    InjectedBundleUserMessageDecoder messageDecoder(injectedBundleInitializationUserData);

Return to Bug 109255