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

Side by Side Diff: Source/core/workers/InProcessWorkerBase.cpp

Issue 1322523002: Make WorkerScriptLoader back to RefCounted class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « Source/core/workers/InProcessWorkerBase.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/workers/InProcessWorkerBase.h" 6 #include "core/workers/InProcessWorkerBase.h"
7 7
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "core/events/MessageEvent.h" 9 #include "core/events/MessageEvent.h"
10 #include "core/fetch/ResourceFetcher.h" 10 #include "core/fetch/ResourceFetcher.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 bool InProcessWorkerBase::initialize(ExecutionContext* context, const String& ur l, ExceptionState& exceptionState) 46 bool InProcessWorkerBase::initialize(ExecutionContext* context, const String& ur l, ExceptionState& exceptionState)
47 { 47 {
48 suspendIfNeeded(); 48 suspendIfNeeded();
49 49
50 KURL scriptURL = resolveURL(url, exceptionState); 50 KURL scriptURL = resolveURL(url, exceptionState);
51 if (scriptURL.isEmpty()) 51 if (scriptURL.isEmpty())
52 return false; 52 return false;
53 53
54 m_scriptLoader = adoptPtr(new WorkerScriptLoader()); 54 m_scriptLoader = WorkerScriptLoader::create();
55 m_scriptLoader->loadAsynchronously( 55 m_scriptLoader->loadAsynchronously(
56 *context, 56 *context,
57 scriptURL, 57 scriptURL,
58 DenyCrossOriginRequests, 58 DenyCrossOriginRequests,
59 bind(&InProcessWorkerBase::onResponse, this), 59 bind(&InProcessWorkerBase::onResponse, this),
60 bind(&InProcessWorkerBase::onFinished, this)); 60 bind(&InProcessWorkerBase::onFinished, this));
61 61
62 m_contextProxy = createWorkerGlobalScopeProxy(context); 62 m_contextProxy = createWorkerGlobalScopeProxy(context);
63 63
64 return true; 64 return true;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 m_scriptLoader = nullptr; 109 m_scriptLoader = nullptr;
110 } 110 }
111 111
112 DEFINE_TRACE(InProcessWorkerBase) 112 DEFINE_TRACE(InProcessWorkerBase)
113 { 113 {
114 visitor->trace(m_contentSecurityPolicy); 114 visitor->trace(m_contentSecurityPolicy);
115 AbstractWorker::trace(visitor); 115 AbstractWorker::trace(visitor);
116 } 116 }
117 117
118 } // namespace blink 118 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/InProcessWorkerBase.h ('k') | Source/core/workers/WorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698