Bug 168653

Summary: [iOS] WebKit1 should use shared memory pressure handler code.
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
koivisto: review+
Patch for landing none

Description Andreas Kling 2017-02-21 06:45:49 PST
WebKit1 on iOS currently has its own little memory pressure handler implementation. Let's share the code with the other ports.
Comment 1 Andreas Kling 2017-02-21 07:02:00 PST
Created attachment 302254 [details]
Patch
Comment 2 WebKit Commit Bot 2017-02-21 07:04:38 PST
Attachment 302254 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebView.mm:9876:  No space between ^ and block definition.  [whitespace/brackets] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Andreas Kling 2017-02-21 07:06:09 PST
Created attachment 302255 [details]
Patch
Comment 4 WebKit Commit Bot 2017-02-21 07:07:26 PST
Attachment 302255 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebView.mm:9842:  No space between ^ and block definition.  [whitespace/brackets] [4]
Total errors found: 1 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Antti Koivisto 2017-02-21 07:24:38 PST
Comment on attachment 302255 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=302255&action=review

> Source/WebKit/mac/WebView/WebViewPrivate.h:-459
> -+ (BOOL)_isUnderMemoryPressure;
> -+ (void)_clearMemoryPressure;
> -+ (BOOL)_shouldWaitForMemoryClearMessage;
> -+ (void)_releaseMemoryNow;

Please make sure there are no clients for these.
Comment 6 Andreas Kling 2017-02-21 08:10:35 PST
Created attachment 302259 [details]
Patch for landing

Keep _releaseMemoryNow as it turns out there are Apple-internal clients for that. Thx2Antti for being suspicious about this!
Comment 7 WebKit Commit Bot 2017-02-21 08:11:28 PST
Attachment 302259 [details] did not pass style-queue:


ERROR: Source/WebKit/mac/WebView/WebView.mm:1678:  No space between ^ and block definition.  [whitespace/brackets] [4]
ERROR: Source/WebKit/mac/WebView/WebView.mm:9849:  No space between ^ and block definition.  [whitespace/brackets] [4]
Total errors found: 2 in 6 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 WebKit Commit Bot 2017-02-21 13:06:36 PST
Comment on attachment 302259 [details]
Patch for landing

Clearing flags on attachment: 302259

Committed r212742: <http://trac.webkit.org/changeset/212742>
Comment 9 WebKit Commit Bot 2017-02-21 13:06:41 PST
All reviewed patches have been landed.  Closing bug.