Diff
Modified: trunk/Source/WebCore/ChangeLog (145929 => 145930)
--- trunk/Source/WebCore/ChangeLog 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/ChangeLog 2013-03-15 19:03:39 UTC (rev 145930)
@@ -1,3 +1,43 @@
+2013-03-15 Alexey Proskuryakov <a...@apple.com>
+
+ Minor cleanup in worker code
+ https://bugs.webkit.org/show_bug.cgi?id=112455
+
+ Reviewed by Anders Carlsson.
+
+ - Added OVERRIDE keywords.
+ - Toned down FIXMEs about single MessagePort versions of functions. It's not a given
+ that we'll want to get rid of them even when implementing array versions.
+ - Explicitly marked virtual destructors as virtual.
+
+ * dom/MessageEvent.cpp:
+ * dom/MessageEvent.h:
+ * workers/Worker.cpp:
+ * workers/Worker.h:
+ Removed an unused version of postMessage() that took no MessagePorts. This makes
+ it less confusing why MessagePortArray is passed by pointer, and not by reference.
+
+ * workers/DedicatedWorkerContext.cpp:
+ (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
+ * workers/DedicatedWorkerContext.h:
+ Added a destructor instead of an implicit one.
+ Removed an unused version of postMessage() that took no MessagePorts.
+
+ * workers/SharedWorker.h: Removed an unused virtual function (thank you OVERRIDE!)
+
+ * dom/MessagePort.cpp:
+ * dom/MessagePort.h:
+ * loader/WorkerThreadableLoader.h:
+ * page/DOMWindow.h:
+ * workers/AbstractWorker.h:
+ * workers/DedicatedWorkerThread.h:
+ * workers/SharedWorkerContext.h:
+ * workers/SharedWorkerThread.h:
+ * workers/WorkerContext.h:
+ * workers/WorkerMessagingProxy.h:
+ * workers/WorkerObjectProxy.h:
+ * workers/WorkerScriptLoader.h:
+
2013-03-15 Joshua Bell <jsb...@chromium.org>
[V8] Binding: Implement EnforceRange IDL Attribute for long long conversions
Modified: trunk/Source/WebCore/dom/MessageEvent.cpp (145929 => 145930)
--- trunk/Source/WebCore/dom/MessageEvent.cpp 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/dom/MessageEvent.cpp 2013-03-15 19:03:39 UTC (rev 145930)
@@ -153,7 +153,6 @@
return m_dataAsSerializedScriptValue.get();
}
-// FIXME: remove this when we update the ObjC bindings (bug #28774).
MessagePort* MessageEvent::messagePort()
{
if (!m_ports)
@@ -162,7 +161,6 @@
return (*m_ports)[0].get();
}
-// FIXME: remove this when we update the ObjC bindings (bug #28774).
void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, const String& lastEventId, DOMWindow* source, MessagePort* port)
{
OwnPtr<MessagePortArray> ports;
Modified: trunk/Source/WebCore/dom/MessageEvent.h (145929 => 145930)
--- trunk/Source/WebCore/dom/MessageEvent.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/dom/MessageEvent.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -92,9 +92,9 @@
// FIXME: Remove this when we have custom ObjC binding support.
SerializedScriptValue* data() const;
- // FIXME: remove this when we update the ObjC bindings (bug #28774).
+
+ // Needed for Objective-C bindings (see bug 28774).
MessagePort* messagePort();
- // FIXME: remove this when we update the ObjC bindings (bug #28774).
void initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, const String& lastEventId, DOMWindow* source, MessagePort*);
virtual const AtomicString& interfaceName() const;
Modified: trunk/Source/WebCore/dom/MessagePort.cpp (145929 => 145930)
--- trunk/Source/WebCore/dom/MessagePort.cpp 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/dom/MessagePort.cpp 2013-03-15 19:03:39 UTC (rev 145930)
@@ -57,7 +57,6 @@
m_scriptExecutionContext->destroyedMessagePort(this);
}
-// FIXME: remove this when we update the ObjC bindings (bug #28774).
void MessagePort::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, ExceptionCode& ec)
{
MessagePortArray ports;
@@ -66,11 +65,6 @@
postMessage(message, &ports, ec);
}
-void MessagePort::postMessage(PassRefPtr<SerializedScriptValue> message, ExceptionCode& ec)
-{
- postMessage(message, static_cast<MessagePortArray*>(0), ec);
-}
-
void MessagePort::postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionCode& ec)
{
if (!isEntangled())
Modified: trunk/Source/WebCore/dom/MessagePort.h (145929 => 145930)
--- trunk/Source/WebCore/dom/MessagePort.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/dom/MessagePort.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -55,11 +55,10 @@
class MessagePort : public RefCounted<MessagePort>, public EventTarget {
public:
static PassRefPtr<MessagePort> create(ScriptExecutionContext& scriptExecutionContext) { return adoptRef(new MessagePort(scriptExecutionContext)); }
- ~MessagePort();
+ virtual ~MessagePort();
- void postMessage(PassRefPtr<SerializedScriptValue> message, ExceptionCode&);
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, ExceptionCode&);
- // FIXME: remove this when we update the ObjC bindings (bug #28774).
+ // Needed for Objective-C bindings (see bug 28774).
void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, ExceptionCode&);
void start();
@@ -82,8 +81,8 @@
void contextDestroyed();
- virtual const AtomicString& interfaceName() const;
- virtual ScriptExecutionContext* scriptExecutionContext() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
void dispatchMessages();
@@ -111,10 +110,10 @@
private:
explicit MessagePort(ScriptExecutionContext&);
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData();
- virtual EventTargetData* ensureEventTargetData();
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
+ virtual EventTargetData* eventTargetData() OVERRIDE;
+ virtual EventTargetData* ensureEventTargetData() OVERRIDE;
OwnPtr<MessagePortChannel> m_entangledChannel;
Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.h (145929 => 145930)
--- trunk/Source/WebCore/loader/WorkerThreadableLoader.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -64,7 +64,7 @@
~WorkerThreadableLoader();
- virtual void cancel();
+ virtual void cancel() OVERRIDE;
bool done() const { return m_workerClientWrapper->done(); }
@@ -72,8 +72,8 @@
using RefCounted<WorkerThreadableLoader>::deref;
protected:
- virtual void refThreadableLoader() { ref(); }
- virtual void derefThreadableLoader() { deref(); }
+ virtual void refThreadableLoader() OVERRIDE { ref(); }
+ virtual void derefThreadableLoader() OVERRIDE { deref(); }
private:
// Creates a loader on the main thread and bridges communication between
@@ -112,14 +112,14 @@
static void mainThreadCreateLoader(ScriptExecutionContext*, MainThreadBridge*, PassOwnPtr<CrossThreadResourceRequestData>, ThreadableLoaderOptions, const String& outgoingReferrer);
static void mainThreadCancel(ScriptExecutionContext*, MainThreadBridge*);
- virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
- virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
- virtual void didReceiveData(const char*, int dataLength);
- virtual void didReceiveCachedMetadata(const char*, int dataLength);
- virtual void didFinishLoading(unsigned long identifier, double finishTime);
- virtual void didFail(const ResourceError&);
- virtual void didFailAccessControlCheck(const ResourceError&);
- virtual void didFailRedirectCheck();
+ virtual void didSendData(unsigned long long bytesSent, unsigned long long totalBytesToBeSent) OVERRIDE;
+ virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&) OVERRIDE;
+ virtual void didReceiveData(const char*, int dataLength) OVERRIDE;
+ virtual void didReceiveCachedMetadata(const char*, int dataLength) OVERRIDE;
+ virtual void didFinishLoading(unsigned long identifier, double finishTime) OVERRIDE;
+ virtual void didFail(const ResourceError&) OVERRIDE;
+ virtual void didFailAccessControlCheck(const ResourceError&) OVERRIDE;
+ virtual void didFailRedirectCheck() OVERRIDE;
// Only to be used on the main thread.
RefPtr<ThreadableLoader> m_mainThreadLoader;
Modified: trunk/Source/WebCore/page/DOMWindow.h (145929 => 145930)
--- trunk/Source/WebCore/page/DOMWindow.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/page/DOMWindow.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -238,7 +238,7 @@
String crossDomainAccessErrorMessage(DOMWindow* activeWindow);
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
- // FIXME: remove this when we update the ObjC bindings (bug #28774).
+ // Needed for Objective-C bindings (see bug 28774).
void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, const String& targetOrigin, DOMWindow* source, ExceptionCode&);
void postMessageTimerFired(PassOwnPtr<PostMessageTimer>);
void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, PassRefPtr<Event>, PassRefPtr<ScriptCallStack>);
Modified: trunk/Source/WebCore/workers/AbstractWorker.h (145929 => 145930)
--- trunk/Source/WebCore/workers/AbstractWorker.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/AbstractWorker.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -50,14 +50,14 @@
class AbstractWorker : public RefCounted<AbstractWorker>, public ActiveDOMObject, public EventTarget {
public:
// EventTarget APIs
- virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE { return ActiveDOMObject::scriptExecutionContext(); }
DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
using RefCounted<AbstractWorker>::ref;
using RefCounted<AbstractWorker>::deref;
- virtual void contextDestroyed();
+ virtual void contextDestroyed() OVERRIDE;
AbstractWorker(ScriptExecutionContext*);
virtual ~AbstractWorker();
@@ -67,10 +67,10 @@
intptr_t asID() const { return reinterpret_cast<intptr_t>(this); }
private:
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData();
- virtual EventTargetData* ensureEventTargetData();
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
+ virtual EventTargetData* eventTargetData() OVERRIDE;
+ virtual EventTargetData* ensureEventTargetData() OVERRIDE;
EventTargetData m_eventTargetData;
};
Modified: trunk/Source/WebCore/workers/DedicatedWorkerContext.cpp (145929 => 145930)
--- trunk/Source/WebCore/workers/DedicatedWorkerContext.cpp 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/DedicatedWorkerContext.cpp 2013-03-15 19:03:39 UTC (rev 145930)
@@ -41,7 +41,6 @@
namespace WebCore {
-// static
PassRefPtr<DedicatedWorkerContext> DedicatedWorkerContext::create(const KURL& url, const String& userAgent, PassOwnPtr<GroupSettings> settings, DedicatedWorkerThread* thread, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin)
{
RefPtr<DedicatedWorkerContext> context = adoptRef(new DedicatedWorkerContext(url, userAgent, settings, thread, topOrigin));
@@ -54,12 +53,15 @@
{
}
+DedicatedWorkerContext::~DedicatedWorkerContext()
+{
+}
+
const AtomicString& DedicatedWorkerContext::interfaceName() const
{
return eventNames().interfaceForDedicatedWorkerContext;
}
-// FIXME: remove this when we update the ObjC bindings (bug #28774).
void DedicatedWorkerContext::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, ExceptionCode& ec)
{
MessagePortArray ports;
@@ -68,11 +70,6 @@
postMessage(message, &ports, ec);
}
-void DedicatedWorkerContext::postMessage(PassRefPtr<SerializedScriptValue> message, ExceptionCode& ec)
-{
- postMessage(message, static_cast<MessagePortArray*>(0), ec);
-}
-
void DedicatedWorkerContext::postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionCode& ec)
{
// Disentangle the port in preparation for sending it to the remote context.
Modified: trunk/Source/WebCore/workers/DedicatedWorkerContext.h (145929 => 145930)
--- trunk/Source/WebCore/workers/DedicatedWorkerContext.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/DedicatedWorkerContext.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -45,23 +45,24 @@
public:
typedef WorkerContext Base;
static PassRefPtr<DedicatedWorkerContext> create(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType, PassRefPtr<SecurityOrigin> topOrigin);
+ virtual ~DedicatedWorkerContext();
- virtual bool isDedicatedWorkerContext() const { return true; }
+ virtual bool isDedicatedWorkerContext() const OVERRIDE { return true; }
// Overridden to allow us to check our pending activity after executing imported script.
- virtual void importScripts(const Vector<String>& urls, ExceptionCode&);
+ virtual void importScripts(const Vector<String>& urls, ExceptionCode&) OVERRIDE;
// EventTarget
- virtual const AtomicString& interfaceName() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
- void postMessage(PassRefPtr<SerializedScriptValue>, ExceptionCode&);
void postMessage(PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionCode&);
- // FIXME: remove this when we update the ObjC bindings (bug #28774).
+ // Needed for Objective-C bindings (see bug 28774).
void postMessage(PassRefPtr<SerializedScriptValue>, MessagePort*, ExceptionCode&);
DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
DedicatedWorkerThread* thread();
+
private:
DedicatedWorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, DedicatedWorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
};
Modified: trunk/Source/WebCore/workers/DedicatedWorkerThread.h (145929 => 145930)
--- trunk/Source/WebCore/workers/DedicatedWorkerThread.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/DedicatedWorkerThread.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -43,11 +43,11 @@
public:
static PassRefPtr<DedicatedWorkerThread> create(const KURL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; }
- ~DedicatedWorkerThread();
+ virtual ~DedicatedWorkerThread();
protected:
- virtual PassRefPtr<WorkerContext> createWorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin);
- virtual void runEventLoop();
+ virtual PassRefPtr<WorkerContext> createWorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) OVERRIDE;
+ virtual void runEventLoop() OVERRIDE;
private:
DedicatedWorkerThread(const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin);
Modified: trunk/Source/WebCore/workers/SharedWorker.h (145929 => 145930)
--- trunk/Source/WebCore/workers/SharedWorker.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/SharedWorker.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -45,13 +45,11 @@
MessagePort* port() const { return m_port.get(); }
- virtual const AtomicString& interfaceName() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
private:
explicit SharedWorker(ScriptExecutionContext*);
- virtual SharedWorker* toSharedWorker() { return this; }
-
RefPtr<MessagePort> m_port;
};
Modified: trunk/Source/WebCore/workers/SharedWorkerContext.h (145929 => 145930)
--- trunk/Source/WebCore/workers/SharedWorkerContext.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/SharedWorkerContext.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -47,19 +47,20 @@
static PassRefPtr<SharedWorkerContext> create(const String& name, const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, SharedWorkerThread*, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType);
virtual ~SharedWorkerContext();
- virtual bool isSharedWorkerContext() const { return true; }
+ virtual bool isSharedWorkerContext() const OVERRIDE { return true; }
// EventTarget
- virtual const AtomicString& interfaceName() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
// Setters/Getters for attributes in SharedWorkerContext.idl
DEFINE_ATTRIBUTE_EVENT_LISTENER(connect);
String name() const { return m_name; }
SharedWorkerThread* thread();
+
private:
SharedWorkerContext(const String& name, const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, SharedWorkerThread*);
- virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>);
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
String m_name;
};
Modified: trunk/Source/WebCore/workers/SharedWorkerThread.h (145929 => 145930)
--- trunk/Source/WebCore/workers/SharedWorkerThread.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/SharedWorkerThread.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -40,10 +40,10 @@
class SharedWorkerThread : public WorkerThread {
public:
static PassRefPtr<SharedWorkerThread> create(const String& name, const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
- ~SharedWorkerThread();
+ virtual ~SharedWorkerThread();
protected:
- virtual PassRefPtr<WorkerContext> createWorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin);
+ virtual PassRefPtr<WorkerContext> createWorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) OVERRIDE;
private:
SharedWorkerThread(const String& name, const KURL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
Modified: trunk/Source/WebCore/workers/Worker.cpp (145929 => 145930)
--- trunk/Source/WebCore/workers/Worker.cpp 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/Worker.cpp 2013-03-15 19:03:39 UTC (rev 145930)
@@ -94,7 +94,6 @@
return eventNames().interfaceForWorker;
}
-// FIXME: remove this when we update the ObjC bindings (bug #28774).
void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort* port, ExceptionCode& ec)
{
MessagePortArray ports;
@@ -103,11 +102,6 @@
postMessage(message, &ports, ec);
}
-void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, ExceptionCode& ec)
-{
- postMessage(message, static_cast<MessagePortArray*>(0), ec);
-}
-
void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray* ports, ExceptionCode& ec)
{
// Disentangle the port in preparation for sending it to the remote context.
Modified: trunk/Source/WebCore/workers/Worker.h (145929 => 145930)
--- trunk/Source/WebCore/workers/Worker.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/Worker.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -54,18 +54,17 @@
static PassRefPtr<Worker> create(ScriptExecutionContext*, const String& url, ExceptionCode&);
virtual ~Worker();
- virtual const AtomicString& interfaceName() const;
+ virtual const AtomicString& interfaceName() const OVERRIDE;
- void postMessage(PassRefPtr<SerializedScriptValue> message, ExceptionCode&);
void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePortArray*, ExceptionCode&);
- // FIXME: remove this when we update the ObjC bindings (bug #28774).
+ // Needed for Objective-C bindings (see bug 28774).
void postMessage(PassRefPtr<SerializedScriptValue> message, MessagePort*, ExceptionCode&);
void terminate();
- virtual bool canSuspend() const;
- virtual void stop();
- virtual bool hasPendingActivity() const;
+ virtual bool canSuspend() const OVERRIDE;
+ virtual void stop() OVERRIDE;
+ virtual bool hasPendingActivity() const OVERRIDE;
DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
@@ -73,11 +72,11 @@
explicit Worker(ScriptExecutionContext*);
// WorkerScriptLoaderClient callbacks
- virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&);
- virtual void notifyFinished();
+ virtual void didReceiveResponse(unsigned long identifier, const ResourceResponse&) OVERRIDE;
+ virtual void notifyFinished() OVERRIDE;
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
RefPtr<WorkerScriptLoader> m_scriptLoader;
WorkerContextProxy* m_contextProxy; // The proxy outlives the worker to perform thread shutdown.
Modified: trunk/Source/WebCore/workers/WorkerContext.h (145929 => 145930)
--- trunk/Source/WebCore/workers/WorkerContext.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/WorkerContext.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -59,9 +59,9 @@
public:
virtual ~WorkerContext();
- virtual bool isWorkerContext() const { return true; }
+ virtual bool isWorkerContext() const OVERRIDE { return true; }
- virtual ScriptExecutionContext* scriptExecutionContext() const;
+ virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
virtual bool isSharedWorkerContext() const { return false; }
virtual bool isDedicatedWorkerContext() const { return false; }
@@ -72,7 +72,7 @@
const GroupSettings* groupSettings() { return m_groupSettings.get(); }
virtual String userAgent(const KURL&) const;
- virtual void disableEval(const String& errorMessage);
+ virtual void disableEval(const String& errorMessage) OVERRIDE;
WorkerScriptController* script() { return m_script.get(); }
void clearScript() { m_script.clear(); }
@@ -84,7 +84,7 @@
bool hasPendingActivity() const;
- virtual void postTask(PassOwnPtr<Task>); // Executes the task on context's thread asynchronously.
+ virtual void postTask(PassOwnPtr<Task>) OVERRIDE; // Executes the task on context's thread asynchronously.
// WorkerGlobalScope
WorkerContext* self() { return this; }
@@ -104,10 +104,10 @@
void clearInterval(int timeoutId);
// ScriptExecutionContext
- virtual WorkerEventQueue* eventQueue() const;
+ virtual WorkerEventQueue* eventQueue() const OVERRIDE;
- virtual bool isContextThread() const;
- virtual bool isJSExecutionForbidden() const;
+ virtual bool isContextThread() const OVERRIDE;
+ virtual bool isJSExecutionForbidden() const OVERRIDE;
#if ENABLE(INSPECTOR)
WorkerInspectorController* workerInspectorController() { return m_workerInspectorController.get(); }
@@ -144,25 +144,25 @@
WorkerContext(const KURL&, const String& userAgent, PassOwnPtr<GroupSettings>, WorkerThread*, PassRefPtr<SecurityOrigin> topOrigin);
void applyContentSecurityPolicyFromString(const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType);
- virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>);
+ virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) OVERRIDE;
void addMessageToWorkerConsole(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
private:
- virtual void refScriptExecutionContext() { ref(); }
- virtual void derefScriptExecutionContext() { deref(); }
+ virtual void refScriptExecutionContext() OVERRIDE { ref(); }
+ virtual void derefScriptExecutionContext() OVERRIDE { deref(); }
- virtual void refEventTarget() { ref(); }
- virtual void derefEventTarget() { deref(); }
- virtual EventTargetData* eventTargetData();
- virtual EventTargetData* ensureEventTargetData();
+ virtual void refEventTarget() OVERRIDE { ref(); }
+ virtual void derefEventTarget() OVERRIDE { deref(); }
+ virtual EventTargetData* eventTargetData() OVERRIDE;
+ virtual EventTargetData* ensureEventTargetData() OVERRIDE;
- virtual const KURL& virtualURL() const;
+ virtual const KURL& virtualURL() const OVERRIDE;
virtual KURL virtualCompleteURL(const String&) const;
- virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0);
- virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0);
+ virtual void addMessage(MessageSource, MessageLevel, const String& message, const String& sourceURL, unsigned lineNumber, PassRefPtr<ScriptCallStack>, ScriptState* = 0, unsigned long requestIdentifier = 0) OVERRIDE;
+ virtual void addConsoleMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0) OVERRIDE;
- virtual EventTarget* errorEventTarget();
+ virtual EventTarget* errorEventTarget() OVERRIDE;
KURL m_url;
String m_userAgent;
Modified: trunk/Source/WebCore/workers/WorkerMessagingProxy.h (145929 => 145930)
--- trunk/Source/WebCore/workers/WorkerMessagingProxy.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/WorkerMessagingProxy.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -53,36 +53,36 @@
// Implementations of WorkerContextProxy.
// (Only use these methods in the worker object thread.)
- virtual void startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode);
- virtual void terminateWorkerContext();
- virtual void postMessageToWorkerContext(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>);
- virtual bool hasPendingActivity() const;
- virtual void workerObjectDestroyed();
+ virtual void startWorkerContext(const KURL& scriptURL, const String& userAgent, const String& sourceCode, WorkerThreadStartMode) OVERRIDE;
+ virtual void terminateWorkerContext() OVERRIDE;
+ virtual void postMessageToWorkerContext(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) OVERRIDE;
+ virtual bool hasPendingActivity() const OVERRIDE;
+ virtual void workerObjectDestroyed() OVERRIDE;
#if ENABLE(INSPECTOR)
- virtual void connectToInspector(WorkerContextProxy::PageInspector*);
- virtual void disconnectFromInspector();
- virtual void sendMessageToInspector(const String&);
+ virtual void connectToInspector(WorkerContextProxy::PageInspector*) OVERRIDE;
+ virtual void disconnectFromInspector() OVERRIDE;
+ virtual void sendMessageToInspector(const String&) OVERRIDE;
#endif
// Implementations of WorkerObjectProxy.
// (Only use these methods in the worker context thread.)
- virtual void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>);
- virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL);
- virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL);
+ virtual void postMessageToWorkerObject(PassRefPtr<SerializedScriptValue>, PassOwnPtr<MessagePortChannelArray>) OVERRIDE;
+ virtual void postExceptionToWorkerObject(const String& errorMessage, int lineNumber, const String& sourceURL) OVERRIDE;
+ virtual void postConsoleMessageToWorkerObject(MessageSource, MessageLevel, const String& message, int lineNumber, const String& sourceURL) OVERRIDE;
#if ENABLE(INSPECTOR)
- virtual void postMessageToPageInspector(const String&);
- virtual void updateInspectorStateCookie(const String&);
+ virtual void postMessageToPageInspector(const String&) OVERRIDE;
+ virtual void updateInspectorStateCookie(const String&) OVERRIDE;
#endif
- virtual void confirmMessageFromWorkerObject(bool hasPendingActivity);
- virtual void reportPendingActivity(bool hasPendingActivity);
- virtual void workerContextClosed();
- virtual void workerContextDestroyed();
+ virtual void confirmMessageFromWorkerObject(bool hasPendingActivity) OVERRIDE;
+ virtual void reportPendingActivity(bool hasPendingActivity) OVERRIDE;
+ virtual void workerContextClosed() OVERRIDE;
+ virtual void workerContextDestroyed() OVERRIDE;
// Implementation of WorkerLoaderProxy.
// These methods are called on different threads to schedule loading
// requests and to send callbacks back to WorkerContext.
- virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>);
- virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContext::Task>, const String& mode);
+ virtual void postTaskToLoader(PassOwnPtr<ScriptExecutionContext::Task>) OVERRIDE;
+ virtual bool postTaskForModeToWorkerContext(PassOwnPtr<ScriptExecutionContext::Task>, const String& mode) OVERRIDE;
void workerThreadCreated(PassRefPtr<DedicatedWorkerThread>);
Modified: trunk/Source/WebCore/workers/WorkerObjectProxy.h (145929 => 145930)
--- trunk/Source/WebCore/workers/WorkerObjectProxy.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/WorkerObjectProxy.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -50,7 +50,7 @@
virtual void reportPendingActivity(bool hasPendingActivity) = 0;
// No need to notify the parent page context when dedicated workers are closing.
- virtual void workerContextClosed() { }
+ virtual void workerContextClosed() OVERRIDE { }
};
} // namespace WebCore
Modified: trunk/Source/WebCore/workers/WorkerScriptLoader.h (145929 => 145930)
--- trunk/Source/WebCore/workers/WorkerScriptLoader.h 2013-03-15 18:58:05 UTC (rev 145929)
+++ trunk/Source/WebCore/workers/WorkerScriptLoader.h 2013-03-15 19:03:39 UTC (rev 145930)
@@ -67,11 +67,11 @@
bool failed() const { return m_failed; }
unsigned long identifier() const { return m_identifier; }
- virtual void didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse&);
- virtual void didReceiveData(const char* data, int dataLength);
- virtual void didFinishLoading(unsigned long identifier, double);
- virtual void didFail(const ResourceError&);
- virtual void didFailRedirectCheck();
+ virtual void didReceiveResponse(unsigned long /*identifier*/, const ResourceResponse&) OVERRIDE;
+ virtual void didReceiveData(const char* data, int dataLength) OVERRIDE;
+ virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE;
+ virtual void didFail(const ResourceError&) OVERRIDE;
+ virtual void didFailRedirectCheck() OVERRIDE;
#if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
void setTargetType(ResourceRequest::TargetType targetType) { m_targetType = targetType; }