Index: WebCore/bindings/js/JSEventTarget.cpp |
diff --git a/WebCore/bindings/js/JSEventTarget.cpp b/WebCore/bindings/js/JSEventTarget.cpp |
index b75cccf6a8178ab559f876e78de41eb35b19d8db..b9373921c5959b3f2bb532893e2d74392601a6ed 100644 |
--- a/WebCore/bindings/js/JSEventTarget.cpp |
+++ b/WebCore/bindings/js/JSEventTarget.cpp |
@@ -61,6 +61,11 @@ |
#include "SharedWorker.h" |
#endif |
+#if ENABLE(WEB_SOCKETS) |
+#include "JSWebSocket.h" |
+#include "WebSocket.h" |
+#endif |
+ |
using namespace JSC; |
namespace WebCore { |
@@ -109,6 +114,11 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, EventTarget* targ |
return toJS(exec, globalObject, sharedWorker); |
#endif |
+#if ENABLE(WEB_SOCKETS) |
+ if (WebSocket* websocket = target->toWebSocket()) |
+ return toJS(exec, websocket); |
+#endif |
+ |
ASSERT_NOT_REACHED(); |
return jsNull(); |
} |
@@ -144,6 +154,10 @@ EventTarget* toEventTarget(JSC::JSValue value) |
CONVERT_TO_EVENT_TARGET(SharedWorker) |
#endif |
+#if ENABLE(WEB_SOCKETS) |
+ CONVERT_TO_EVENT_TARGET(WebSocket) |
+#endif |
+ |
return 0; |
} |