Ignore:
Timestamp:
Jun 18, 2006, 10:11:51 AM (19 years ago)
Author:
andersca
Message:

JavaScriptCore:

2006-06-18 Anders Carlsson <[email protected]>

Reviewed by Geoff.

  • kjs/interpreter.cpp: (KJS::TimeoutChecker::pauseTimeoutCheck): Do nothing if the timeout check hasn't been started.


(KJS::TimeoutChecker::resumeTimeoutCheck):
Do nothing if the timeout check hasn't been started.
Use the right signal handler when unblocking.


(KJS::Interpreter::handleTimeout):
pause/resume the timeout check around the call to
shouldInterruptScript().


WebCore:

2006-06-17 Anders Carlsson <[email protected]>

Reviewed by Geoff.

  • bindings/js/kjs_binding.cpp: (KJS::ScriptInterpreter::ScriptInterpreter): Set the default script timeout.


(KJS::ScriptInterpreter::shouldInterruptScript):
New function which asks the frame if the script should be interrupted.


  • bindings/js/kjs_binding.h:


  • bindings/js/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent):
  • bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate): Add calls to startTimeoutCheck/stopTimeoutCheck


  • bindings/js/kjs_window.cpp: (KJS::WindowFunc::callAsFunction): Add calls to pauseTimeoutCheck/unpauseTimeoutCheck


(KJS::ScheduledAction::execute):
Add calls to startTimeoutCheck/stopTimeoutCheck


  • bridge/mac/FrameMac.h:
  • bridge/mac/FrameMac.mm: (WebCore::FrameMac::shouldInterruptJavaScript): New function which asks the bridge if the script should be interrupted.


  • bridge/mac/WebCoreFrameBridge.h:
  • page/Frame.h: Add function declarations.


WebKit:

2006-06-18 Anders Carlsson <[email protected]>

Reviewed by Geoff.

  • WebCoreSupport/WebFrameBridge.m: (-[WebFrameBridge shouldInterruptJavaScript]): Ask the UI delegate if the script should be interrupted.


  • WebView/WebUIDelegatePrivate.h: Declare webViewShouldInterruptJavaScript: delegate method
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/interpreter.cpp

    r14902 r14904  
    143143void TimeoutChecker::pauseTimeoutCheck(Interpreter* interpreter)
    144144{
    145 #if HAVE(SYS_TIME_H)
     145    if (interpreter->m_startTimeoutCheckCount == 0)
     146        return;
     147
     148#if HAVE(SYS_TIME_H)   
    146149    ASSERT(interpreter == s_executingInterpreter);
    147150
     
    164167void TimeoutChecker::resumeTimeoutCheck(Interpreter* interpreter)
    165168{
     169    if (interpreter->m_startTimeoutCheckCount == 0)
     170        return;
     171
    166172#if HAVE(SYS_TIME_H)
    167173    ASSERT(interpreter == s_executingInterpreter);
     
    187193
    188194    // Unblock signal
    189     currentSignalHandler = signal(SIGALRM, SIG_IGN);   
     195    currentSignalHandler = signal(SIGALRM, alarmHandler);   
    190196#endif
    191197}
     
    802808{
    803809    m_timedOut = false;
    804    
    805     return shouldInterruptScript();
     810
     811    pauseTimeoutCheck();
     812    bool retval = shouldInterruptScript();
     813    resumeTimeoutCheck();
     814   
     815    return retval;
    806816}
    807817
Note: See TracChangeset for help on using the changeset viewer.