diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp index 20580982dd..875e904ad6 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSEventTarget.cpp @@ -56,6 +56,11 @@ #include "WorkerContext.h" #endif +#if ENABLE(SHARED_WORKERS) +#include "JSSharedWorker.h" +#include "SharedWorker.h" +#endif + using namespace JSC; namespace WebCore { @@ -101,6 +106,11 @@ JSValue toJS(ExecState* exec, EventTarget* target) return toJSDOMGlobalObject(workerContext); #endif +#if ENABLE(SHARED_WORKERS) + if (SharedWorker* sharedWorker = target->toSharedWorker()) + return toJS(exec, sharedWorker); +#endif + ASSERT_NOT_REACHED(); return jsNull(); } @@ -132,6 +142,10 @@ EventTarget* toEventTarget(JSC::JSValue value) CONVERT_TO_EVENT_TARGET(WorkerContext) #endif +#if ENABLE(SHARED_WORKERS) + CONVERT_TO_EVENT_TARGET(SharedWorker) +#endif + return 0; } |