Reviewed by David Levin.
Add onerror to WorkerContext.
https://bugs.webkit.org/show_bug.cgi?id=27516
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::mark):
* workers/WorkerContext.h:
(WebCore::WorkerContext::setOnerror):
(WebCore::WorkerContext::onerror):
* workers/WorkerContext.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@46197
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2009-07-21 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add onerror to WorkerContext.
+ https://bugs.webkit.org/show_bug.cgi?id=27516
+
+ * bindings/js/JSWorkerContextCustom.cpp:
+ (WebCore::JSWorkerContext::mark):
+ * workers/WorkerContext.h:
+ (WebCore::WorkerContext::setOnerror):
+ (WebCore::WorkerContext::onerror):
+ * workers/WorkerContext.idl:
+
2009-07-21 Yong Li <yong.li@torchmobile.com>
Reviewed by George Staikos.
2009-07-21 Yong Li <yong.li@torchmobile.com>
Reviewed by George Staikos.
markDOMObjectWrapper(globalData, impl()->optionalLocation());
markDOMObjectWrapper(globalData, impl()->optionalNavigator());
markDOMObjectWrapper(globalData, impl()->optionalLocation());
markDOMObjectWrapper(globalData, impl()->optionalNavigator());
+ markIfNotNull(impl()->onerror());
markIfNotNull(impl()->onmessage());
typedef WorkerContext::EventListenersMap EventListenersMap;
markIfNotNull(impl()->onmessage());
typedef WorkerContext::EventListenersMap EventListenersMap;
WorkerContext* self() { return this; }
WorkerLocation* location() const;
void close();
WorkerContext* self() { return this; }
WorkerLocation* location() const;
void close();
+ void setOnerror(PassRefPtr<EventListener> eventListener) { m_onErrorListener = eventListener; }
+ EventListener* onerror() const { return m_onErrorListener.get(); }
// WorkerUtils
void importScripts(const Vector<String>& urls, const String& callerURL, int callerLine, ExceptionCode&);
// WorkerUtils
void importScripts(const Vector<String>& urls, const String& callerURL, int callerLine, ExceptionCode&);
OwnPtr<WorkerScriptController> m_script;
WorkerThread* m_thread;
OwnPtr<WorkerScriptController> m_script;
WorkerThread* m_thread;
+ RefPtr<EventListener> m_onErrorListener;
RefPtr<EventListener> m_onmessageListener;
EventListenersMap m_eventListeners;
RefPtr<EventListener> m_onmessageListener;
EventListenersMap m_eventListeners;
// WorkerGlobalScope
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
// WorkerGlobalScope
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
- attribute [Replaceable] WorkerContext self;
+ attribute [Replaceable] WorkerContext self;
- attribute [Replaceable] WorkerLocation location;
+ attribute [Replaceable] WorkerLocation location;
- // attribute EventListener onerror;
+ attribute EventListener onerror;
// WorkerUtils
[Custom] void importScripts(/*[Variadic] in DOMString urls */);
// WorkerUtils
[Custom] void importScripts(/*[Variadic] in DOMString urls */);