Changeset 51523 in webkit


Ignore:
Timestamp:
Nov 30, 2009 5:18:50 PM (14 years ago)
Author:
weinig@apple.com
Message:

Fix for https://bugs.webkit.org/show_bug.cgi?id=31286
fast/js/date-proto-generic-invocation breaks another test

Reviewed by Geoffrey Garen.

Don't cache JSClassRefs, a change to the prototype chain will
last between tests.

  • DumpRenderTree/AccessibilityController.cpp:

(AccessibilityController::getJSClass):

  • DumpRenderTree/GCController.cpp:

(GCController::getJSClass):

  • DumpRenderTree/GCController.h:
  • DumpRenderTree/LayoutTestController.cpp:

(LayoutTestController::getJSClass):

Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51521 r51523  
     12009-11-30  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Geoffrey Garen.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=31286
     6        fast/js/date-proto-generic-invocation breaks another test
     7
     8        Don't cache JSClassRefs, a change to the prototype chain will
     9        last between tests.
     10
     11        * DumpRenderTree/AccessibilityController.cpp:
     12        (AccessibilityController::getJSClass):
     13        * DumpRenderTree/GCController.cpp:
     14        (GCController::getJSClass):
     15        * DumpRenderTree/GCController.h:
     16        * DumpRenderTree/LayoutTestController.cpp:
     17        (LayoutTestController::getJSClass):
     18
    1192009-11-30  Yuzo Fujishima  <yuzo@google.com>
    220
  • trunk/WebKitTools/DumpRenderTree/AccessibilityController.cpp

    r48368 r51523  
    8686    };
    8787
    88     static JSClassRef accessibilityControllerClass = JSClassCreate(&classDefinition);
    89     return accessibilityControllerClass;
     88    return JSClassCreate(&classDefinition);
    9089}
    9190
  • trunk/WebKitTools/DumpRenderTree/GCController.cpp

    r42056 r51523  
    8181JSClassRef GCController::getJSClass()
    8282{
    83     static JSClassRef gcControllerClass = 0;
    84 
    85     if (!gcControllerClass) {
    86         JSStaticFunction* staticFunctions = GCController::staticFunctions();
    87         JSClassDefinition classDefinition = {
    88             0, kJSClassAttributeNone, "GCController", 0, 0, staticFunctions,
    89             0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
    90         };
    91 
    92         gcControllerClass = JSClassCreate(&classDefinition);
    93     }
    94 
    95     return gcControllerClass;
    96 }
    97 
    98 JSStaticFunction* GCController::staticFunctions()
    99 {
    10083    static JSStaticFunction staticFunctions[] = {
    10184        { "collect", collectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     
    10588    };
    10689
    107     return staticFunctions;
     90    static JSClassDefinition classDefinition = {
     91        0, kJSClassAttributeNone, "GCController", 0, 0, staticFunctions,
     92        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     93    };
     94
     95    return JSClassCreate(&classDefinition);
    10896}
  • trunk/WebKitTools/DumpRenderTree/GCController.h

    r29663 r51523  
    4646private:
    4747    static JSClassRef getJSClass();
    48     static JSStaticFunction* staticFunctions();
    4948};
    5049
  • trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp

    r51294 r51523  
    11801180JSClassRef LayoutTestController::getJSClass()
    11811181{
    1182     static JSClassRef layoutTestControllerClass;
    1183 
    1184     if (!layoutTestControllerClass) {
    1185         JSStaticValue* staticValues = LayoutTestController::staticValues();
    1186         JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
    1187         JSClassDefinition classDefinition = {
    1188             0, kJSClassAttributeNone, "LayoutTestController", 0, staticValues, staticFunctions,
    1189             0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
    1190         };
    1191 
    1192         layoutTestControllerClass = JSClassCreate(&classDefinition);
    1193     }
    1194 
    1195     return layoutTestControllerClass;
     1182    static JSStaticValue* staticValues = LayoutTestController::staticValues();
     1183    static JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
     1184    static JSClassDefinition classDefinition = {
     1185        0, kJSClassAttributeNone, "LayoutTestController", 0, staticValues, staticFunctions,
     1186        0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
     1187    };
     1188
     1189    return JSClassCreate(&classDefinition);
    11961190}
    11971191
Note: See TracChangeset for help on using the changeset viewer.