Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 1190133002: Remove WorkerScriptLoaderClient and inheritances (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review #6 and #7 Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/workers/InProcessWorkerBase.cpp ('k') | Source/core/workers/WorkerScriptLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.cpp
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
index 6444e5b57eeb189894911f2001a0af9c762010fe..d93616593bf15e7afaa0e6c145f95a0878ba00c4 100644
--- a/Source/core/workers/WorkerGlobalScope.cpp
+++ b/Source/core/workers/WorkerGlobalScope.cpp
@@ -241,23 +241,23 @@ void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState
}
for (const KURL& completeURL : completedURLs) {
- RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create());
- scriptLoader->setRequestContext(WebURLRequest::RequestContextScript);
- scriptLoader->loadSynchronously(executionContext, completeURL, AllowCrossOriginRequests);
+ WorkerScriptLoader scriptLoader;
+ scriptLoader.setRequestContext(WebURLRequest::RequestContextScript);
+ scriptLoader.loadSynchronously(executionContext, completeURL, AllowCrossOriginRequests);
// If the fetching attempt failed, throw a NetworkError exception and abort all these steps.
- if (scriptLoader->failed()) {
+ if (scriptLoader.failed()) {
exceptionState.throwDOMException(NetworkError, "The script at '" + completeURL.elidedString() + "' failed to load.");
return;
}
- InspectorInstrumentation::scriptImported(&executionContext, scriptLoader->identifier(), scriptLoader->script());
- scriptLoaded(scriptLoader->script().length(), scriptLoader->cachedMetadata() ? scriptLoader->cachedMetadata()->size() : 0);
+ InspectorInstrumentation::scriptImported(&executionContext, scriptLoader.identifier(), scriptLoader.script());
+ scriptLoaded(scriptLoader.script().length(), scriptLoader.cachedMetadata() ? scriptLoader.cachedMetadata()->size() : 0);
RefPtrWillBeRawPtr<ErrorEvent> errorEvent = nullptr;
- OwnPtr<Vector<char>> cachedMetaData(scriptLoader->releaseCachedMetadata());
+ OwnPtr<Vector<char>> cachedMetaData(scriptLoader.releaseCachedMetadata());
OwnPtr<CachedMetadataHandler> handler(createWorkerScriptCachedMetadataHandler(completeURL, cachedMetaData.get()));
- m_script->evaluate(ScriptSourceCode(scriptLoader->script(), scriptLoader->responseURL()), &errorEvent, handler.get(), m_v8CacheOptions);
+ m_script->evaluate(ScriptSourceCode(scriptLoader.script(), scriptLoader.responseURL()), &errorEvent, handler.get(), m_v8CacheOptions);
if (errorEvent) {
m_script->rethrowExceptionFromImportedScript(errorEvent.release(), exceptionState);
return;
« no previous file with comments | « Source/core/workers/InProcessWorkerBase.cpp ('k') | Source/core/workers/WorkerScriptLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698