Nope, roll out r84950 and r84952. Working on a laptop is clearly not something
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2011 21:15:28 +0000 (21:15 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Apr 2011 21:15:28 +0000 (21:15 +0000)
I should do.

* bindings/js/JSDOMBinding.h:
(WebCore::JSDOMWrapperWithGlobalPointer::globalObject):
(WebCore::JSDOMWrapperWithGlobalPointer::scriptExecutionContext):
(WebCore::JSDOMWrapperWithGlobalPointer::createStructure):
(WebCore::JSDOMWrapperWithGlobalPointer::JSDOMWrapperWithGlobalPointer):
(WebCore::DOMConstructorObject::DOMConstructorObject):
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/scripts/CodeGeneratorJS.pm:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84954 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMWrapper.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

index fe6f9e8..c7707a5 100644 (file)
@@ -1,5 +1,20 @@
 2011-04-26  Sam Weinig  <sam@webkit.org>
 
+        Nope, roll out r84950 and r84952. Working on a laptop is clearly not something
+        I should do.
+
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::JSDOMWrapperWithGlobalPointer::globalObject):
+        (WebCore::JSDOMWrapperWithGlobalPointer::scriptExecutionContext):
+        (WebCore::JSDOMWrapperWithGlobalPointer::createStructure):
+        (WebCore::JSDOMWrapperWithGlobalPointer::JSDOMWrapperWithGlobalPointer):
+        (WebCore::DOMConstructorObject::DOMConstructorObject):
+        * bindings/js/JSDOMWrapper.h:
+        (WebCore::JSDOMWrapper::JSDOMWrapper):
+        * bindings/scripts/CodeGeneratorJS.pm:
+
+2011-04-26  Sam Weinig  <sam@webkit.org>
+
         Fix build.
 
         * bindings/js/JSDOMWrapper.h:
index 8b23f02..fc633b8 100644 (file)
@@ -52,8 +52,39 @@ namespace WebCore {
 
     typedef int ExceptionCode;
 
+    // FIXME: This class should collapse into JSDOMWrapper once all JSDOMWrappers are
+    // updated to store a globalObject pointer.
+    class JSDOMWrapperWithGlobalPointer : public JSDOMWrapper {
+    public:
+        JSDOMGlobalObject* globalObject() const
+        {
+            return static_cast<JSDOMGlobalObject*>(JSDOMWrapper::globalObject());
+        }
+
+        ScriptExecutionContext* scriptExecutionContext() const
+        {
+            // FIXME: Should never be 0, but can be due to bug 27640.
+            return globalObject()->scriptExecutionContext();
+        }
+
+        static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
+        {
+            return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
+        }
+
+    protected:
+        JSDOMWrapperWithGlobalPointer(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
+            : JSDOMWrapper(globalObject, structure)
+        {
+            // FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
+            // new JavaScript objects on detached windows due to DOMWindow::document()
+            // needing to reach through the frame to get to the Document*.  See bug 27640.
+            // ASSERT(globalObject->scriptExecutionContext());
+        }
+    };
+
     // Base class for all constructor objects in the JSC bindings.
-    class DOMConstructorObject : public JSDOMWrapper {
+    class DOMConstructorObject : public JSDOMWrapperWithGlobalPointer {
     public:
         static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
         {
@@ -61,9 +92,9 @@ namespace WebCore {
         }
 
     protected:
-        static const unsigned StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesVisitChildren | JSDOMWrapper::StructureFlags;
+        static const unsigned StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesVisitChildren | JSDOMWrapperWithGlobalPointer::StructureFlags;
         DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
-            : JSDOMWrapper(structure, globalObject)
+            : JSDOMWrapperWithGlobalPointer(structure, globalObject)
         {
         }
     };
index 2f5bebd..1484dc6 100644 (file)
 #ifndef JSDOMWrapper_h
 #define JSDOMWrapper_h
 
-#include "JSDOMGlobalObject.h"
 #include <runtime/JSObjectWithGlobalObject.h>
 
 namespace WebCore {
 
-class ScriptExecutionContext;
-
 class JSDOMWrapper : public JSC::JSObjectWithGlobalObject {
-public:
-    JSDOMGlobalObject* globalObject() const
-    {
-        return static_cast<JSDOMGlobalObject*>(JSC::JSObjectWithGlobalObject::globalObject());
-    }
-
-    ScriptExecutionContext* scriptExecutionContext() const
-    {
-        // FIXME: Should never be 0, but can be due to bug 27640.
-        return globalObject()->scriptExecutionContext();
-    }
-
-    static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
-    {
-        return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
-    }
-
 protected:
-    explicit JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject* globalObject
+    explicit JSDOMWrapper(JSC::JSGlobalObject* globalObject, JSC::Structure* structure
         : JSObjectWithGlobalObject(globalObject, structure)
     {
-        // FIXME: This ASSERT is valid, but fires in fast/dom/gc-6.html when trying to create
-        // new JavaScript objects on detached windows due to DOMWindow::document()
-        // needing to reach through the frame to get to the Document*.  See bug 27640.
-        // ASSERT(globalObject->scriptExecutionContext());
     }
 
 #ifndef NDEBUG
index cfb1b5c..af75ae9 100644 (file)
@@ -200,7 +200,7 @@ sub GetParentClassName
     my $dataNode = shift;
 
     return $dataNode->extendedAttributes->{"LegacyParent"} if $dataNode->extendedAttributes->{"LegacyParent"};
-    return "JSDOMWrapper" if (@{$dataNode->parents} eq 0);
+    return "JSDOMWrapperWithGlobalPointer" if (@{$dataNode->parents} eq 0);
     return "JS" . $codeGenerator->StripModule($dataNode->parents(0));
 }