Changeset 23526 in webkit


Ignore:
Timestamp:
Jun 14, 2007 9:13:09 AM (17 years ago)
Author:
andersca
Message:

JavaScriptCore:

Reviewed by Mitz.

<rdar://problem/5244948>
Safari keeps on complaining about slow script playing NBC TV video (14133)

http://bugs.webkit.org/show_bug.cgi?id=14133
Runaway JavaScript timer fires when spinning around in Google Maps street view

Make sure to start and stop the timeout checker around calls to JS.


  • bindings/NP_jsobject.cpp: (_NPN_InvokeDefault): (_NPN_Invoke): (_NPN_Evaluate):
  • bindings/jni/jni_jsobject.cpp: (JavaJSObject::call): (JavaJSObject::eval):

WebCore:

Reviewed by Mitz.

<rdar://problem/5244948>
Safari keeps on complaining about slow script playing NBC TV video (14133)

http://bugs.webkit.org/show_bug.cgi?id=14133
Runaway JavaScript timer fires when spinning around in Google Maps street view

Make sure to start and stop the timeout checker around calls to JS.

  • bindings/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r23521 r23526  
     12007-06-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Mitz.
     4
     5        <rdar://problem/5244948>
     6        Safari keeps on complaining about slow script playing NBC TV video (14133)
     7
     8        http://bugs.webkit.org/show_bug.cgi?id=14133
     9        Runaway JavaScript timer fires when spinning around in Google Maps street view
     10
     11        Make sure to start and stop the timeout checker around calls to JS.
     12       
     13        * bindings/NP_jsobject.cpp:
     14        (_NPN_InvokeDefault):
     15        (_NPN_Invoke):
     16        (_NPN_Evaluate):
     17        * bindings/jni/jni_jsobject.cpp:
     18        (JavaJSObject::call):
     19        (JavaJSObject::eval):
     20
    1212007-06-13  Darin Adler  <darin@apple.com>
    222
  • trunk/JavaScriptCore/bindings/NP_jsobject.cpp

    r23512 r23526  
    125125       
    126126        List argList = listFromVariantArgs(exec, args, argCount, rootObject);
     127        rootObject->interpreter()->startTimeoutCheck();
    127128        JSValue *resultV = funcImp->call (exec, funcImp, argList);
    128        
     129        rootObject->interpreter()->stopTimeoutCheck();
     130
    129131        // Convert and return the result of the function call.
    130132        convertValueToNPVariant(exec, resultV, result);
     
    178180        JSObject *thisObj = const_cast<JSObject*>(obj->imp);
    179181        List argList = listFromVariantArgs(exec, args, argCount, rootObject);
     182        rootObject->interpreter()->startTimeoutCheck();
    180183        JSValue *resultV = funcImp->call (exec, thisObj, argList);
     184        rootObject->interpreter()->stopTimeoutCheck();
    181185
    182186        // Convert and return the result of the function call.
     
    210214        unsigned int UTF16Length;
    211215        convertNPStringToUTF16(s, &scriptString, &UTF16Length); // requires free() of returned memory
     216        rootObject->interpreter()->startTimeoutCheck();
    212217        Completion completion = rootObject->interpreter()->evaluate(UString(), 0, UString((const UChar*)scriptString,UTF16Length));
     218        rootObject->interpreter()->stopTimeoutCheck();
    213219        ComplType type = completion.complType();
    214220       
  • trunk/JavaScriptCore/bindings/jni/jni_jsobject.cpp

    r22056 r23526  
    178178    JSObject *thisObj = const_cast<JSObject*>(_imp);
    179179    List argList = listFromJArray(args);
     180    rootObject->interpreter()->startTimeoutCheck();
    180181    JSValue *result = funcImp->call(exec, thisObj, argList);
     182    rootObject->interpreter()->stopTimeoutCheck();
    181183
    182184    return convertValueToJObject(result);
     
    196198        return 0;
    197199
     200    rootObject->interpreter()->startTimeoutCheck();
    198201    Completion completion = rootObject->interpreter()->evaluate(UString(), 0, JavaString(script).ustring(),thisObj);
     202    rootObject->interpreter()->stopTimeoutCheck();
    199203    ComplType type = completion.complType();
    200204   
  • trunk/WebCore/ChangeLog

    r23523 r23526  
     12007-06-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Mitz.
     4
     5        <rdar://problem/5244948>
     6        Safari keeps on complaining about slow script playing NBC TV video (14133)
     7
     8        http://bugs.webkit.org/show_bug.cgi?id=14133
     9        Runaway JavaScript timer fires when spinning around in Google Maps street view
     10
     11        Make sure to start and stop the timeout checker around calls to JS.
     12
     13        * bindings/objc/WebScriptObject.mm:
     14        (-[WebScriptObject callWebScriptMethod:withArguments:]):
     15        (-[WebScriptObject evaluateWebScript:]):
     16
    1172007-06-14  George Staikos  <staikos@kde.org>
    218
  • trunk/WebCore/bindings/objc/WebScriptObject.mm

    r23512 r23526  
    287287    JSObject *thisObj = const_cast<JSObject*>([self _imp]);
    288288    List argList = listFromNSArray(exec, args, [self _rootObject]);
     289    [self _rootObject]->interpreter()->startTimeoutCheck();
    289290    JSValue *result = funcImp->call(exec, thisObj, argList);
     291    [self _rootObject]->interpreter()->stopTimeoutCheck();
    290292
    291293    if (exec->hadException()) {
     
    318320   
    319321    JSValue *v = convertObjcValueToValue(exec, &script, ObjcObjectType, [self _rootObject]);
     322    [self _rootObject]->interpreter()->startTimeoutCheck();
    320323    Completion completion = [self _rootObject]->interpreter()->evaluate(UString(), 0, v->toString(exec));
     324    [self _rootObject]->interpreter()->stopTimeoutCheck();
    321325    ComplType type = completion.complType();
    322326   
Note: See TracChangeset for help on using the changeset viewer.