diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/workers')
19 files changed, 57 insertions, 55 deletions
diff --git a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp index 24e9bb88a92..e4b9c7f177f 100644 --- a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.cpp @@ -57,24 +57,24 @@ void AbstractWorker::contextDestroyed() KURL AbstractWorker::resolveURL(const String& url, ExceptionState& es) { if (url.isEmpty()) { - es.throwDOMException(SyntaxError, "Failed to create a worker: an empty URL was provided."); + es.throwDOMException(SyntaxError); return KURL(); } // FIXME: This should use the dynamic global scope (bug #27887) KURL scriptURL = scriptExecutionContext()->completeURL(url); if (!scriptURL.isValid()) { - es.throwDOMException(SyntaxError, "Failed to create a worker: '" + url + "' is not a valid URL."); + es.throwDOMException(SyntaxError); return KURL(); } if (!scriptExecutionContext()->securityOrigin()->canRequest(scriptURL)) { - es.throwDOMException(SecurityError, "Failed to create a worker: script with origin '" + SecurityOrigin::create(scriptURL)->toString() + "' cannot be accessed from origin '" + scriptExecutionContext()->securityOrigin()->toString() + "'."); + es.throwDOMException(SecurityError); return KURL(); } if (scriptExecutionContext()->contentSecurityPolicy() && !scriptExecutionContext()->contentSecurityPolicy()->allowScriptFromSource(scriptURL)) { - es.throwDOMException(SecurityError, "Failed to create a worker: access to the script at '" + url + "' is denied by the document's Content Security Policy."); + es.throwDOMException(SecurityError); return KURL(); } diff --git a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h index de94684d9bd..5805534924f 100644 --- a/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h +++ b/chromium/third_party/WebKit/Source/core/workers/AbstractWorker.h @@ -36,10 +36,10 @@ #include "core/dom/EventListener.h" #include "core/dom/EventNames.h" #include "core/dom/EventTarget.h" -#include "wtf/PassRefPtr.h" -#include "wtf/RefCounted.h" -#include "wtf/RefPtr.h" -#include "wtf/text/AtomicStringHash.h" +#include <wtf/PassRefPtr.h> +#include <wtf/RefCounted.h> +#include <wtf/RefPtr.h> +#include <wtf/text/AtomicStringHash.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h b/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h index 6cf1ee1b450..1237988ab14 100644 --- a/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h +++ b/chromium/third_party/WebKit/Source/core/workers/DefaultSharedWorkerRepository.h @@ -32,14 +32,14 @@ #define DefaultSharedWorkerRepository_h #include "core/page/ContentSecurityPolicy.h" -#include "wtf/Forward.h" -#include "wtf/HashMap.h" -#include "wtf/Noncopyable.h" -#include "wtf/PassOwnPtr.h" -#include "wtf/PassRefPtr.h" -#include "wtf/RefPtr.h" -#include "wtf/Threading.h" -#include "wtf/text/StringHash.h" +#include <wtf/Forward.h> +#include <wtf/HashMap.h> +#include <wtf/Noncopyable.h> +#include <wtf/PassOwnPtr.h> +#include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> +#include <wtf/text/StringHash.h> +#include <wtf/Threading.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp b/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp index 6ccf3e4fd91..55019ec7dc5 100644 --- a/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/SharedWorker.cpp @@ -65,18 +65,18 @@ PassRefPtr<SharedWorker> SharedWorker::create(ScriptExecutionContext* context, c worker->suspendIfNeeded(); + KURL scriptURL = worker->resolveURL(url, es); + if (scriptURL.isEmpty()) + return 0; + // We don't currently support nested workers, so workers can only be created from documents. ASSERT_WITH_SECURITY_IMPLICATION(context->isDocument()); Document* document = toDocument(context); if (!document->securityOrigin()->canAccessSharedWorkers()) { - es.throwDOMException(SecurityError, "Failed to create 'SharedWorker': access to shared workers is denied to origin '" + document->securityOrigin()->toString() + "'."); + es.throwDOMException(SecurityError); return 0; } - KURL scriptURL = worker->resolveURL(url, es); - if (scriptURL.isEmpty()) - return 0; - SharedWorkerRepository::connect(worker.get(), remotePort.release(), scriptURL, name, es); return worker.release(); diff --git a/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h b/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h index 26d15cbf068..6a3927af560 100644 --- a/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h +++ b/chromium/third_party/WebKit/Source/core/workers/SharedWorkerRepository.h @@ -31,9 +31,9 @@ #ifndef SharedWorkerRepository_h #define SharedWorkerRepository_h -#include "wtf/Forward.h" -#include "wtf/PassOwnPtr.h" -#include "wtf/PassRefPtr.h" +#include <wtf/Forward.h> +#include <wtf/PassOwnPtr.h> +#include <wtf/PassRefPtr.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/Worker.cpp b/chromium/third_party/WebKit/Source/core/workers/Worker.cpp index 52d852393ae..c94d08c4e70 100644 --- a/chromium/third_party/WebKit/Source/core/workers/Worker.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/Worker.cpp @@ -33,9 +33,9 @@ #include "core/dom/EventListener.h" #include "core/dom/EventNames.h" #include "core/dom/MessageEvent.h" -#include "core/fetch/ResourceFetcher.h" #include "core/inspector/InspectorInstrumentation.h" #include "core/loader/FrameLoader.h" +#include "core/loader/cache/ResourceFetcher.h" #include "core/page/DOMWindow.h" #include "core/page/Frame.h" #include "core/page/UseCounter.h" diff --git a/chromium/third_party/WebKit/Source/core/workers/Worker.h b/chromium/third_party/WebKit/Source/core/workers/Worker.h index 023578a9f21..3f0eb1a166c 100644 --- a/chromium/third_party/WebKit/Source/core/workers/Worker.h +++ b/chromium/third_party/WebKit/Source/core/workers/Worker.h @@ -34,10 +34,10 @@ #include "core/dom/MessagePort.h" #include "core/workers/AbstractWorker.h" #include "core/workers/WorkerScriptLoaderClient.h" -#include "wtf/Forward.h" -#include "wtf/PassRefPtr.h" -#include "wtf/RefPtr.h" -#include "wtf/text/AtomicStringHash.h" +#include <wtf/Forward.h> +#include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> +#include <wtf/text/AtomicStringHash.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h b/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h index fda0b93eed9..5eb85673b5a 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerEventQueue.h @@ -28,10 +28,10 @@ #define WorkerEventQueue_h #include "core/dom/EventQueue.h" -#include "wtf/HashMap.h" -#include "wtf/HashSet.h" -#include "wtf/PassOwnPtr.h" -#include "wtf/RefCounted.h" +#include <wtf/HashMap.h> +#include <wtf/HashSet.h> +#include <wtf/PassOwnPtr.h> +#include <wtf/RefCounted.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp index 374aa7e4726..f80e1ffce1f 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp @@ -194,7 +194,7 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState for (Vector<String>::const_iterator it = urls.begin(); it != urlsEnd; ++it) { const KURL& url = scriptExecutionContext()->completeURL(*it); if (!url.isValid()) { - es.throwDOMException(SyntaxError, "Failed to execute 'importScripts': the URL '" + *it + "' is invalid."); + es.throwDOMException(SyntaxError); return; } completedURLs.append(url); @@ -208,7 +208,7 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState // If the fetching attempt failed, throw a NetworkError exception and abort all these steps. if (scriptLoader->failed()) { - es.throwDOMException(NetworkError, "Failed to execute 'importScripts': the script at '" + it->elidedString() + "' failed to load."); + es.throwDOMException(NetworkError); return; } diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl index f7a445e3fd7..87c3594f8f7 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerGlobalScope.idl @@ -37,7 +37,7 @@ attribute EventHandler onerror; // WorkerUtils - [RaisesException] void importScripts(DOMString... urls); + [Custom] void importScripts(/*[Variadic] in DOMString urls */); [Replaceable] readonly attribute WorkerNavigator navigator; // Additional constructors diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h index f3eed8dc807..3342d900d77 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerLoaderProxy.h @@ -32,8 +32,8 @@ #define WorkerLoaderProxy_h #include "core/dom/ScriptExecutionContext.h" -#include "wtf/Forward.h" -#include "wtf/PassOwnPtr.h" +#include <wtf/Forward.h> +#include <wtf/PassOwnPtr.h> namespace WebKit { class WebWorkerBase; diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp index c93e8d1be15..87b509067c6 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerLocation.cpp @@ -25,9 +25,10 @@ */ #include "config.h" + #include "core/workers/WorkerLocation.h" -#include "wtf/text/WTFString.h" +#include <wtf/text/WTFString.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp index 9794ea62322..eb15b16300e 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.cpp @@ -49,7 +49,7 @@ #include "core/workers/Worker.h" #include "core/workers/WorkerClients.h" #include "core/workers/WorkerThreadStartupData.h" -#include "wtf/MainThread.h" +#include <wtf/MainThread.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h index 26566bfb2b5..9b2113bd4ae 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerMessagingProxy.h @@ -31,12 +31,12 @@ #include "core/workers/WorkerGlobalScopeProxy.h" #include "core/workers/WorkerLoaderProxy.h" #include "core/workers/WorkerObjectProxy.h" -#include "wtf/Forward.h" -#include "wtf/Noncopyable.h" -#include "wtf/PassOwnPtr.h" -#include "wtf/PassRefPtr.h" -#include "wtf/RefPtr.h" -#include "wtf/Vector.h" +#include <wtf/Forward.h> +#include <wtf/Noncopyable.h> +#include <wtf/PassOwnPtr.h> +#include <wtf/PassRefPtr.h> +#include <wtf/RefPtr.h> +#include <wtf/Vector.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h index d0061f752ac..d4da8699306 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerObjectProxy.h @@ -33,7 +33,7 @@ #include "core/dom/MessagePort.h" #include "core/workers/WorkerReportingProxy.h" -#include "wtf/PassOwnPtr.h" +#include <wtf/PassOwnPtr.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h b/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h index daa8f500b45..a42df140dd0 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h @@ -32,7 +32,7 @@ #define WorkerReportingProxy_h #include "core/page/ConsoleTypes.h" -#include "wtf/Forward.h" +#include <wtf/Forward.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp index e2d2a040f1b..a0744ccebbf 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.cpp @@ -37,7 +37,7 @@ #include "core/platform/ThreadTimers.h" #include "core/workers/WorkerGlobalScope.h" #include "core/workers/WorkerThread.h" -#include "wtf/CurrentTime.h" +#include <wtf/CurrentTime.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h index 8ee3e8eadf4..28a7bc5bf82 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerRunLoop.h @@ -32,9 +32,9 @@ #define WorkerRunLoop_h #include "core/dom/ScriptExecutionContext.h" -#include "wtf/MessageQueue.h" -#include "wtf/OwnPtr.h" -#include "wtf/PassOwnPtr.h" +#include <wtf/MessageQueue.h> +#include <wtf/OwnPtr.h> +#include <wtf/PassOwnPtr.h> namespace WebCore { diff --git a/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp index 7f6290e683a..9c10f8b70bd 100644 --- a/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp +++ b/chromium/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp @@ -26,6 +26,7 @@ */ #include "config.h" + #include "core/workers/WorkerScriptLoader.h" #include "core/dom/ScriptExecutionContext.h" @@ -35,9 +36,9 @@ #include "core/workers/WorkerGlobalScope.h" #include "core/workers/WorkerScriptLoaderClient.h" -#include "wtf/OwnPtr.h" -#include "wtf/RefPtr.h" -#include "wtf/UnusedParam.h" +#include <wtf/OwnPtr.h> +#include <wtf/RefPtr.h> +#include <wtf/UnusedParam.h> namespace WebCore { |