2009-07-24 Jian Li <jianli@chromium.org>
authorjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jul 2009 17:30:10 +0000 (17:30 +0000)
committerjianli@chromium.org <jianli@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jul 2009 17:30:10 +0000 (17:30 +0000)
        Reviewed by Eric Seidel.

        [V8] More V8 bindings changes to use ErrorEvent.
        https://bugs.webkit.org/show_bug.cgi?id=27630

        * bindings/v8/DOMObjectsInclude.h:
        * bindings/v8/DerivedSourcesAllInOne.cpp:
        * bindings/v8/V8DOMWrapper.cpp:
        (WebCore::V8DOMWrapper::convertEventToV8Object):
        * bindings/v8/V8Index.cpp:
        * bindings/v8/V8Index.h:

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

WebCore/ChangeLog
WebCore/bindings/v8/DOMObjectsInclude.h
WebCore/bindings/v8/DerivedSourcesAllInOne.cpp
WebCore/bindings/v8/V8DOMWrapper.cpp
WebCore/bindings/v8/V8Index.cpp
WebCore/bindings/v8/V8Index.h

index 92293c2..73be11c 100644 (file)
@@ -1,3 +1,17 @@
+2009-07-24  Jian Li  <jianli@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        [V8] More V8 bindings changes to use ErrorEvent.
+        https://bugs.webkit.org/show_bug.cgi?id=27630
+
+        * bindings/v8/DOMObjectsInclude.h:
+        * bindings/v8/DerivedSourcesAllInOne.cpp:
+        * bindings/v8/V8DOMWrapper.cpp:
+        (WebCore::V8DOMWrapper::convertEventToV8Object):
+        * bindings/v8/V8Index.cpp:
+        * bindings/v8/V8Index.h:
+
 2009-07-24  Brent Fulgham  <bfulgham@webkit.org>
 
         Reviewed by Dave Hyatt.
index 86e5754..f5f544d 100644 (file)
@@ -65,6 +65,7 @@
 #include "DOMSelection.h"
 #include "DOMWindow.h"
 #include "Entity.h"
+#include "ErrorEvent.h"
 #include "EventListener.h"
 #include "EventTarget.h"
 #include "Event.h"
index c2941c3..8835f0f 100644 (file)
@@ -75,6 +75,7 @@
 #include "bindings/V8Element.cpp"
 #include "bindings/V8Entity.cpp"
 #include "bindings/V8EntityReference.cpp"
+#include "bindings/V8ErrorEvent.cpp"
 #include "bindings/V8Event.cpp"
 #include "bindings/V8EventException.cpp"
 #include "bindings/V8File.cpp"
index df5d356..e85e09c 100644 (file)
@@ -1059,6 +1059,10 @@ v8::Handle<v8::Value> V8DOMWrapper::convertEventToV8Object(Event* event)
         type = V8ClassIndex::WEBKITANIMATIONEVENT;
     else if (event->isWebKitTransitionEvent())
         type = V8ClassIndex::WEBKITTRANSITIONEVENT;
+#if ENABLE(WORKERS)
+    else if (event->isErrorEvent())
+        type = V8ClassIndex::ERROREVENT;
+#endif
 
 
     v8::Handle<v8::Object> result = instantiateV8Object(type, V8ClassIndex::EVENT, event);
index afa81cb..1140424 100644 (file)
 #include "V8DOMCoreException.h"
 #include "V8DOMParser.h"
 #include "V8DOMWindow.h"
+#include "V8ErrorEvent.h"
 #include "V8Event.h"
 #include "V8EventException.h"
 #include "V8KeyboardEvent.h"
index 57f4460..7642eb2 100644 (file)
@@ -409,11 +409,19 @@ typedef v8::Persistent<v8::FunctionTemplate> (*FunctionTemplateFactory)();
 #define DOM_OBJECT_STORAGE_TYPES(V)
 #endif
 
+#if ENABLE(WORKERS)
+#define DOM_OBJECT_WORKERS_TYPES(V)                                     \
+    V(ERROREVENT, ErrorEvent)
+#else
+#define DOM_OBJECT_WORKERS_TYPES(V)
+#endif
+
 #define DOM_OBJECT_TYPES(V)                                             \
     DOM_OBJECT_TYPES_1(V)                                               \
     DOM_OBJECT_TYPES_2(V)                                               \
     DOM_OBJECT_DATABASE_TYPES(V)                                        \
-    DOM_OBJECT_STORAGE_TYPES(V)
+    DOM_OBJECT_STORAGE_TYPES(V)                                         \
+    DOM_OBJECT_WORKERS_TYPES(V)
 
 #if ENABLE(SVG)
 // SVG_OBJECT_TYPES are svg non-node, non-pod types.