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.vcproj/JavaScriptCore/JavaScriptCore.vcproj

    r19103 r19534  
    7373                        <Tool
    7474                                Name="VCLibrarianTool"
     75                                AdditionalDependencies="winmm.lib"
    7576                                OutputFile="$(OutDir)\$(ProjectName)$(ConfigSuffix).lib"
    7677                        />
     
    147148                        <Tool
    148149                                Name="VCLibrarianTool"
     150                                AdditionalDependencies="winmm.lib"
    149151                                OutputFile="$(OutDir)\$(ProjectName)$(ConfigSuffix).lib"
    150152                        />
Note: See TracChangeset for help on using the changeset viewer.