Skip to content
  • dbates@webkit.org's avatar
    [iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout() · fd91c2d1
    dbates@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=123045
    
    Reviewed by Joseph Pecoraro.
    
    Source/JavaScriptCore:
    
    * jsc.cpp: Add function pointer for shouldInterruptScriptBeforeTimeout
    to global method table.
    * runtime/JSGlobalObject.cpp: Ditto.
    * runtime/JSGlobalObject.h:
    (JSC::JSGlobalObject::shouldInterruptScriptBeforeTimeout): Added.
    
    Source/WebCore:
    
    * bindings/js/JSDOMWindowBase.cpp:
    (WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added.
    (WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion
    about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage()
    so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout().
    (WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
    * bindings/js/JSDOMWindowBase.h:
    * bindings/js/JSWorkerGlobalScopeBase.cpp:
    (WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added.
    * bindings/js/JSWorkerGlobalScopeBase.h:
    * loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation
    in a subsequent patch.
    * page/ChromeClient.h: Added isStopping().
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    fd91c2d1