[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

weinig at apple.com weinig at apple.com
Thu Apr 8 00:04:18 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit bb56753aa59631a917d6aa7136939451f3fd5c86
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 1 01:18:50 2009 +0000

    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):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51523 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 5146dfd..4ebe028 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2009-11-30  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Geoffrey Garen.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=31286
+        fast/js/date-proto-generic-invocation breaks another test
+
+        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):
+
 2009-11-30  Yuzo Fujishima  <yuzo at google.com>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebKitTools/DumpRenderTree/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
index af1daf6..ea8b835 100644
--- a/WebKitTools/DumpRenderTree/AccessibilityController.cpp
+++ b/WebKitTools/DumpRenderTree/AccessibilityController.cpp
@@ -85,8 +85,7 @@ JSClassRef AccessibilityController::getJSClass()
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
     };
 
-    static JSClassRef accessibilityControllerClass = JSClassCreate(&classDefinition);
-    return accessibilityControllerClass;
+    return JSClassCreate(&classDefinition);
 }
 
 void AccessibilityController::resetToConsistentState()
diff --git a/WebKitTools/DumpRenderTree/GCController.cpp b/WebKitTools/DumpRenderTree/GCController.cpp
index fe84a58..12aadbf 100644
--- a/WebKitTools/DumpRenderTree/GCController.cpp
+++ b/WebKitTools/DumpRenderTree/GCController.cpp
@@ -80,23 +80,6 @@ void GCController::makeWindowObject(JSContextRef context, JSObjectRef windowObje
 
 JSClassRef GCController::getJSClass()
 {
-    static JSClassRef gcControllerClass = 0;
-
-    if (!gcControllerClass) {
-        JSStaticFunction* staticFunctions = GCController::staticFunctions();
-        JSClassDefinition classDefinition = {
-            0, kJSClassAttributeNone, "GCController", 0, 0, staticFunctions,
-            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-        };
-
-        gcControllerClass = JSClassCreate(&classDefinition);
-    }
-
-    return gcControllerClass;
-}
-
-JSStaticFunction* GCController::staticFunctions()
-{
     static JSStaticFunction staticFunctions[] = {
         { "collect", collectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "collectOnAlternateThread", collectOnAlternateThreadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -104,5 +87,10 @@ JSStaticFunction* GCController::staticFunctions()
         { 0, 0, 0 }
     };
 
-    return staticFunctions;
+    static JSClassDefinition classDefinition = {
+        0, kJSClassAttributeNone, "GCController", 0, 0, staticFunctions,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+    };
+
+    return JSClassCreate(&classDefinition);
 }
diff --git a/WebKitTools/DumpRenderTree/GCController.h b/WebKitTools/DumpRenderTree/GCController.h
index 4284275..afc1de0 100644
--- a/WebKitTools/DumpRenderTree/GCController.h
+++ b/WebKitTools/DumpRenderTree/GCController.h
@@ -45,7 +45,6 @@ public:
 
 private:
     static JSClassRef getJSClass();
-    static JSStaticFunction* staticFunctions();
 };
 
 #endif // GCController_h
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index ed9cb30..d199d6f 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -1179,20 +1179,14 @@ void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef wi
 
 JSClassRef LayoutTestController::getJSClass()
 {
-    static JSClassRef layoutTestControllerClass;
-
-    if (!layoutTestControllerClass) {
-        JSStaticValue* staticValues = LayoutTestController::staticValues();
-        JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
-        JSClassDefinition classDefinition = {
-            0, kJSClassAttributeNone, "LayoutTestController", 0, staticValues, staticFunctions,
-            0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
-        };
-
-        layoutTestControllerClass = JSClassCreate(&classDefinition);
-    }
+    static JSStaticValue* staticValues = LayoutTestController::staticValues();
+    static JSStaticFunction* staticFunctions = LayoutTestController::staticFunctions();
+    static JSClassDefinition classDefinition = {
+        0, kJSClassAttributeNone, "LayoutTestController", 0, staticValues, staticFunctions,
+        0, layoutTestControllerObjectFinalize, 0, 0, 0, 0, 0, 0, 0, 0, 0
+    };
 
-    return layoutTestControllerClass;
+    return JSClassCreate(&classDefinition);
 }
 
 JSStaticValue* LayoutTestController::staticValues()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list