Ignore:
Timestamp:
Feb 9, 2007, 11:28:02 AM (18 years ago)
Author:
andersca
Message:

JavaScriptCore:

Reviewed by Geoff.

<rdar://problem/4930614>
Safari complains about "Slow Script" if GMail is left open and machine is busy


<rdar://problem/4649516>
Turn off slow script dialog or crank up time that makes it come up


<rdar://problem/4963589>
Slow script warning is displayed after closing of PROMPT or PRINT dialog


Re-do the way script timeouts are handled. No longer use a unix timer that sends signals. Instead, add a
tick count and increment it in loop bodies. If the tick count reaches a threshold, do a timeout check. If the total time executing
is higher than the timeout value, (possibly) interrupt the script. The timeout checker also adjusts the threshold dynamically
to prevent doing the timeout check too often.



  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add winmm.lib.
  • kjs/interpreter.cpp: (KJS::Interpreter::init): (KJS::Interpreter::~Interpreter): (KJS::Interpreter::startTimeoutCheck): (KJS::Interpreter::stopTimeoutCheck): (KJS::Interpreter::resetTimeoutCheck): (KJS::getCurrentTime): (KJS::Interpreter::checkTimeout):
  • kjs/interpreter.h: (KJS::Interpreter::timedOut):
  • kjs/nodes.cpp: (DoWhileNode::execute): (WhileNode::execute): (ForNode::execute):

WebCore:

Reviewed by Geoff.

No need to pause timeout checks anymore.


  • bindings/js/kjs_window.cpp: (KJS::WindowFunc::callAsFunction):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r19183 r19534  
    115115__ZN3KJS11Interpreter16initGlobalObjectEv
    116116__ZN3KJS11Interpreter16stopTimeoutCheckEv
    117 __ZN3KJS11Interpreter17pauseTimeoutCheckEv
    118117__ZN3KJS11Interpreter17startTimeoutCheckEv
    119 __ZN3KJS11Interpreter18resumeTimeoutCheckEv
    120118__ZN3KJS11Interpreter21shouldPrintExceptionsEv
    121119__ZN3KJS11Interpreter24setShouldPrintExceptionsEb
Note: See TracChangeset for help on using the changeset viewer.