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

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

Issue 360233005: Replace 'ResourceRequest::TargetType' with 'ResourceRequest::RequestContext'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 if (!contentSecurityPolicy()->allowScriptFromSource(url)) { 242 if (!contentSecurityPolicy()->allowScriptFromSource(url)) {
243 exceptionState.throwDOMException(NetworkError, "The script at '" + u rl.elidedString() + "' failed to load."); 243 exceptionState.throwDOMException(NetworkError, "The script at '" + u rl.elidedString() + "' failed to load.");
244 return; 244 return;
245 } 245 }
246 completedURLs.append(url); 246 completedURLs.append(url);
247 } 247 }
248 Vector<KURL>::const_iterator end = completedURLs.end(); 248 Vector<KURL>::const_iterator end = completedURLs.end();
249 249
250 for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++i t) { 250 for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++i t) {
251 RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create()); 251 RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create());
252 scriptLoader->setTargetType(ResourceRequest::TargetIsScript); 252 scriptLoader->setRequestContext(ResourceRequest::ScriptContext);
253 scriptLoader->loadSynchronously(executionContext, *it, AllowCrossOriginR equests); 253 scriptLoader->loadSynchronously(executionContext, *it, AllowCrossOriginR equests);
254 254
255 // If the fetching attempt failed, throw a NetworkError exception and ab ort all these steps. 255 // If the fetching attempt failed, throw a NetworkError exception and ab ort all these steps.
256 if (scriptLoader->failed()) { 256 if (scriptLoader->failed()) {
257 exceptionState.throwDOMException(NetworkError, "The script at '" + i t->elidedString() + "' failed to load."); 257 exceptionState.throwDOMException(NetworkError, "The script at '" + i t->elidedString() + "' failed to load.");
258 return; 258 return;
259 } 259 }
260 260
261 InspectorInstrumentation::scriptImported(&executionContext, scriptLoader ->identifier(), scriptLoader->script()); 261 InspectorInstrumentation::scriptImported(&executionContext, scriptLoader ->identifier(), scriptLoader->script());
262 262
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 visitor->trace(m_location); 339 visitor->trace(m_location);
340 visitor->trace(m_navigator); 340 visitor->trace(m_navigator);
341 visitor->trace(m_eventQueue); 341 visitor->trace(m_eventQueue);
342 visitor->trace(m_workerClients); 342 visitor->trace(m_workerClients);
343 WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor); 343 WillBeHeapSupplementable<WorkerGlobalScope>::trace(visitor);
344 ExecutionContext::trace(visitor); 344 ExecutionContext::trace(visitor);
345 EventTargetWithInlineData::trace(visitor); 345 EventTargetWithInlineData::trace(visitor);
346 } 346 }
347 347
348 } // namespace WebCore 348 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698