⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185749 in webkit


Ignore:
Timestamp:
Jun 19, 2015, 9:53:49 AM (11 years ago)
Author:
andersca@apple.com
Message:

Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
https://bugs.webkit.org/show_bug.cgi?id=146124
rdar://problem/21449395

Reviewed by Geoffrey Garen.

Add a HangDetectionDisabler RAII object and use it for JavaScript panels.

  • Shared/HangDetectionDisabler.h: Added.

(WebKit::HangDetectionDisabler::HangDetectionDisabler):
(WebKit::HangDetectionDisabler::~HangDetectionDisabler):

  • Shared/mac/HangDetectionDisablerMac.mm: Added.

(WebKit::clientsMayIgnoreEvents):
(WebKit::setClientsMayIgnoreEvents):
(WebKit::HangDetectionDisabler::HangDetectionDisabler):
(WebKit::HangDetectionDisabler::~HangDetectionDisabler):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):

Location:
trunk/Source
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r185744 r185749  
     12015-06-19  Anders Carlsson  <andersca@apple.com>
     2
     3        Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
     4        https://bugs.webkit.org/show_bug.cgi?id=146124
     5        rdar://problem/21449395
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * platform/spi/cg/CoreGraphicsSPI.h:
     10
    1112015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
    212
  • trunk/Source/WebCore/platform/spi/cg/CoreGraphicsSPI.h

    r183696 r185749  
    180180CGSConnectionID CGSMainConnectionID(void);
    181181CFArrayRef CGSHWCaptureWindowList(CGSConnectionID cid, CGSWindowIDList windowList, CGSWindowCount windowCount, CGSWindowCaptureOptions options);
     182CGError CGSSetConnectionProperty(CGSConnectionID, CGSConnectionID ownerCid, CFStringRef key, CFTypeRef value);
     183CGError CGSCopyConnectionProperty(CGSConnectionID, CGSConnectionID ownerCid, CFStringRef key, CFTypeRef *value);
    182184#endif
    183185
  • trunk/Source/WebKit2/ChangeLog

    r185748 r185749  
     12015-06-19  Anders Carlsson  <andersca@apple.com>
     2
     3        Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
     4        https://bugs.webkit.org/show_bug.cgi?id=146124
     5        rdar://problem/21449395
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Add a HangDetectionDisabler RAII object and use it for JavaScript panels.
     10
     11        * Shared/HangDetectionDisabler.h: Added.
     12        (WebKit::HangDetectionDisabler::HangDetectionDisabler):
     13        (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
     14        * Shared/mac/HangDetectionDisablerMac.mm: Added.
     15        (WebKit::clientsMayIgnoreEvents):
     16        (WebKit::setClientsMayIgnoreEvents):
     17        (WebKit::HangDetectionDisabler::HangDetectionDisabler):
     18        (WebKit::HangDetectionDisabler::~HangDetectionDisabler):
     19        * WebKit2.xcodeproj/project.pbxproj:
     20        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
     21        (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
     22        (WebKit::WebChromeClient::runJavaScriptAlert):
     23        (WebKit::WebChromeClient::runJavaScriptConfirm):
     24        (WebKit::WebChromeClient::runJavaScriptPrompt):
     25
    1262015-06-19  Dan Bernstein  <mitz@apple.com>
    227
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r185706 r185749  
    439439                1AC7537F183BE50F0072CB15 /* DataReference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC7537D183BE50F0072CB15 /* DataReference.cpp */; };
    440440                1AC75380183BE50F0072CB15 /* DataReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC7537E183BE50F0072CB15 /* DataReference.h */; };
     441                1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */; };
     442                1AC75A1E1B33695E0056745B /* HangDetectionDisablerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */; };
    441443                1AC86FF3130B46D3002C1257 /* WKPluginSiteDataManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC86FF1130B46D3002C1257 /* WKPluginSiteDataManager.cpp */; };
    442444                1AC86FF4130B46D3002C1257 /* WKPluginSiteDataManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC86FF2130B46D3002C1257 /* WKPluginSiteDataManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    25642566                1AC7537D183BE50F0072CB15 /* DataReference.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataReference.cpp; sourceTree = "<group>"; };
    25652567                1AC7537E183BE50F0072CB15 /* DataReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataReference.h; sourceTree = "<group>"; };
     2568                1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HangDetectionDisabler.h; sourceTree = "<group>"; };
     2569                1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HangDetectionDisablerMac.mm; sourceTree = "<group>"; };
    25662570                1AC86FF1130B46D3002C1257 /* WKPluginSiteDataManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKPluginSiteDataManager.cpp; sourceTree = "<group>"; };
    25672571                1AC86FF2130B46D3002C1257 /* WKPluginSiteDataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPluginSiteDataManager.h; sourceTree = "<group>"; };
     
    47004704                                BCE81D8B1319F7EF00241910 /* FontInfo.h */,
    47014705                                762B7481120BBA0100819339 /* FontSmoothingLevel.h */,
     4706                                1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */,
    47024707                                F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */,
    47034708                                BCCF6B2312C93E7A008F9C35 /* ImageOptions.h */,
     
    64496454                                CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */,
    64506455                                CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */,
     6456                                1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */,
    64516457                                5163EA431ACC74AE0012D1E4 /* NativeContextMenuItem.mm */,
    64526458                                C02BFF1D1251502E009CCBEA /* NativeWebKeyboardEventMac.mm */,
     
    79978003                                BCBD3915125BB1A800D2C29F /* WebPageProxyMessages.h in Headers */,
    79988004                                512127C41908239A00DAF35C /* WebPasteboardOverrides.h in Headers */,
     8005                                1AC75A1B1B3368270056745B /* HangDetectionDisabler.h in Headers */,
    79998006                                7C4694D11A51E36800AD5845 /* WebPasteboardProxy.h in Headers */,
    80008007                                7C4694CA1A4B4EA100AD5845 /* WebPasteboardProxyMessages.h in Headers */,
     
    1003310040                                37608822150414F700FC82C7 /* WKRenderObject.cpp in Sources */,
    1003410041                                3336763A130C99DC006C9DE2 /* WKResourceCacheManager.cpp in Sources */,
     10042                                1AC75A1E1B33695E0056745B /* HangDetectionDisablerMac.mm in Sources */,
    1003510043                                1A7E377818E4A4FE003D0FFF /* WKScriptMessage.mm in Sources */,
    1003610044                                0FCB4E5518BBE044000FCFC9 /* WKScrollView.mm in Sources */,
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r185721 r185749  
    3131#include "APISecurityOrigin.h"
    3232#include "DrawingArea.h"
     33#include "HangDetectionDisabler.h"
    3334#include "InjectedBundleNavigationAction.h"
    3435#include "InjectedBundleNodeHandle.h"
     
    335336    bool shouldClose = false;
    336337
     338    HangDetectionDisabler hangDetectionDisabler;
     339
    337340    unsigned syncSendFlags = IPC::InformPlatformProcessWillSuspend;
    338341    if (WebPage::synchronousMessagesShouldSpinRunLoop())
     
    372375    m_page->injectedBundleUIClient().willRunJavaScriptAlert(m_page, alertText, webFrame);
    373376
     377    HangDetectionDisabler hangDetectionDisabler;
     378
    374379    unsigned syncSendFlags = IPC::InformPlatformProcessWillSuspend;
    375380    if (WebPage::synchronousMessagesShouldSpinRunLoop())
     
    385390    // Notify the bundle client.
    386391    m_page->injectedBundleUIClient().willRunJavaScriptConfirm(m_page, message, webFrame);
     392
     393    HangDetectionDisabler hangDetectionDisabler;
    387394
    388395    unsigned syncSendFlags = IPC::InformPlatformProcessWillSuspend;
     
    403410    // Notify the bundle client.
    404411    m_page->injectedBundleUIClient().willRunJavaScriptPrompt(m_page, message, defaultValue, webFrame);
     412
     413    HangDetectionDisabler hangDetectionDisabler;
    405414
    406415    unsigned syncSendFlags = IPC::InformPlatformProcessWillSuspend;
Note: See TracChangeset for help on using the changeset viewer.