Summary: | Add notify handler to trigger MemoryPressureHandler in all builds | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||||
Component: | WebCore Misc. | Assignee: | Michael Saboff <msaboff> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Michael Saboff
2011-06-14 16:51:17 PDT
Created attachment 97314 [details]
Proposed patch
Comment on attachment 97314 [details]
Proposed patch
r=me
Created attachment 97703 [details]
Updated patch using notify
Comment on attachment 97703 [details] Updated patch using notify View in context: https://bugs.webkit.org/attachment.cgi?id=97703&action=review > Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm:55 > +static int notifyToken; This can go inside the function where it’s used instead of at the file level. > Source/WebCore/platform/mac/MemoryPressureHandlerMac.mm:72 > + notify_register_dispatch("com.apple.WebKit.lowMemory", ¬ifyToken, > + dispatch_get_main_queue(), ^(int) { memoryPressureHandler().respondToMemoryPressure();}); This is not WebKit project style indentation. We don't line up things with parentheses on the line before I suggest "org.WebKit.lowMemory" instead of "com.apple.WebKit.lowMemory". Comment on attachment 97314 [details] Proposed patch Cleared Geoffrey Garen's review+ from obsolete attachment 97314 [details] so that this bug does not appear in http://webkit.org/pending-commit. Committed r89214: <http://trac.webkit.org/changeset/89214> |