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

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

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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
« no previous file with comments | « Source/core/workers/SharedWorker.cpp ('k') | Source/core/xml/XMLHttpRequest.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 /* 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionCode& ec) 207 void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionCode& ec)
208 { 208 {
209 ASSERT(contentSecurityPolicy()); 209 ASSERT(contentSecurityPolicy());
210 ec = 0; 210 ec = 0;
211 Vector<String>::const_iterator urlsEnd = urls.end(); 211 Vector<String>::const_iterator urlsEnd = urls.end();
212 Vector<KURL> completedURLs; 212 Vector<KURL> completedURLs;
213 for (Vector<String>::const_iterator it = urls.begin(); it != urlsEnd; ++it) { 213 for (Vector<String>::const_iterator it = urls.begin(); it != urlsEnd; ++it) {
214 const KURL& url = scriptExecutionContext()->completeURL(*it); 214 const KURL& url = scriptExecutionContext()->completeURL(*it);
215 if (!url.isValid()) { 215 if (!url.isValid()) {
216 ec = SYNTAX_ERR; 216 ec = SyntaxError;
217 return; 217 return;
218 } 218 }
219 completedURLs.append(url); 219 completedURLs.append(url);
220 } 220 }
221 Vector<KURL>::const_iterator end = completedURLs.end(); 221 Vector<KURL>::const_iterator end = completedURLs.end();
222 222
223 for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++i t) { 223 for (Vector<KURL>::const_iterator it = completedURLs.begin(); it != end; ++i t) {
224 RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create()); 224 RefPtr<WorkerScriptLoader> scriptLoader(WorkerScriptLoader::create());
225 scriptLoader->setTargetType(ResourceRequest::TargetIsScript); 225 scriptLoader->setTargetType(ResourceRequest::TargetIsScript);
226 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros sOriginRequests); 226 scriptLoader->loadSynchronously(scriptExecutionContext(), *it, AllowCros sOriginRequests);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 iter = m_workerObservers.begin(); 348 iter = m_workerObservers.begin();
349 } 349 }
350 } 350 }
351 351
352 WorkerEventQueue* WorkerGlobalScope::eventQueue() const 352 WorkerEventQueue* WorkerGlobalScope::eventQueue() const
353 { 353 {
354 return m_eventQueue.get(); 354 return m_eventQueue.get();
355 } 355 }
356 356
357 } // namespace WebCore 357 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/workers/SharedWorker.cpp ('k') | Source/core/xml/XMLHttpRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698