Changeset 244984 in webkit


Ignore:
Timestamp:
May 6, 2019 3:47:26 PM (5 years ago)
Author:
Chris Dumez
Message:

Prewarmed WebContent processes never app nap
https://bugs.webkit.org/show_bug.cgi?id=197630

Reviewed by Geoffrey Garen.

Do not require actually having a WebPage in the WebContent process to App Nap.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updateThrottleState):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r244982 r244984  
     12019-05-06  Chris Dumez  <cdumez@apple.com>
     2
     3        Prewarmed WebContent processes never app nap
     4        https://bugs.webkit.org/show_bug.cgi?id=197630
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Do not require actually having a WebPage in the WebContent process to App Nap.
     9
     10        * WebProcess/WebPage/WebPage.cpp:
     11        (WebKit::WebPage::updateThrottleState):
     12        * WebProcess/cocoa/WebProcessCocoa.mm:
     13        (WebKit::WebProcess::platformInitializeWebProcess):
     14
    1152019-05-06  Daniel Bates  <dabates@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r244849 r244984  
    767767    bool pageSuppressed = m_processSuppressionEnabled && !isActive && isVisuallyIdle;
    768768
    769 #if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
    770     if (!pageSuppressed) {
    771         // App nap must be manually enabled when not running the NSApplication run loop.
    772         static std::once_flag onceKey;
    773         std::call_once(onceKey, [] {
    774             __CFRunLoopSetOptionsReason(__CFRunLoopOptionsEnableAppNap, CFSTR("Finished checkin as application - enable app nap"));
    775         });
    776     }
    777 #endif
    778769    // The UserActivity keeps the processes runnable. So if the page should be suppressed, stop the activity.
    779770    // If the page should not be supressed, start it.
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r244980 r244984  
    200200#endif
    201201
     202#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
     203    // App nap must be manually enabled when not running the NSApplication run loop.
     204    __CFRunLoopSetOptionsReason(__CFRunLoopOptionsEnableAppNap, CFSTR("Finished checkin as application - enable app nap"));
     205#endif
     206
    202207#if TARGET_OS_IPHONE
    203208    // Priority decay on iOS 9 is impacting page load time so we fix the priority of the WebProcess' main thread (rdar://problem/22003112).
Note: See TracChangeset for help on using the changeset viewer.