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

Side by Side Diff: third_party/WebKit/Source/core/loader/ThreadableLoader.cpp

Issue 2327643003: Replace ASSERT*() with DCHECK*() in core/fetch/ and core/loader/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "core/dom/ExecutionContext.h" 34 #include "core/dom/ExecutionContext.h"
35 #include "core/loader/DocumentThreadableLoader.h" 35 #include "core/loader/DocumentThreadableLoader.h"
36 #include "core/loader/WorkerThreadableLoader.h" 36 #include "core/loader/WorkerThreadableLoader.h"
37 #include "core/workers/WorkerGlobalScope.h" 37 #include "core/workers/WorkerGlobalScope.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 ThreadableLoader* ThreadableLoader::create(ExecutionContext& context, Threadable LoaderClient* client, const ThreadableLoaderOptions& options, const ResourceLoad erOptions& resourceLoaderOptions) 41 ThreadableLoader* ThreadableLoader::create(ExecutionContext& context, Threadable LoaderClient* client, const ThreadableLoaderOptions& options, const ResourceLoad erOptions& resourceLoaderOptions)
42 { 42 {
43 ASSERT(client); 43 DCHECK(client);
44 44
45 if (context.isWorkerGlobalScope()) { 45 if (context.isWorkerGlobalScope()) {
46 return WorkerThreadableLoader::create(toWorkerGlobalScope(context), clie nt, options, resourceLoaderOptions); 46 return WorkerThreadableLoader::create(toWorkerGlobalScope(context), clie nt, options, resourceLoaderOptions);
47 } 47 }
48 48
49 return DocumentThreadableLoader::create(toDocument(context), client, options , resourceLoaderOptions); 49 return DocumentThreadableLoader::create(toDocument(context), client, options , resourceLoaderOptions);
50 } 50 }
51 51
52 void ThreadableLoader::loadResourceSynchronously(ExecutionContext& context, cons t ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoad erOptions& options, const ResourceLoaderOptions& resourceLoaderOptions) 52 void ThreadableLoader::loadResourceSynchronously(ExecutionContext& context, cons t ResourceRequest& request, ThreadableLoaderClient& client, const ThreadableLoad erOptions& options, const ResourceLoaderOptions& resourceLoaderOptions)
53 { 53 {
54 if (context.isWorkerGlobalScope()) { 54 if (context.isWorkerGlobalScope()) {
55 WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(co ntext), request, client, options, resourceLoaderOptions); 55 WorkerThreadableLoader::loadResourceSynchronously(toWorkerGlobalScope(co ntext), request, client, options, resourceLoaderOptions);
56 return; 56 return;
57 } 57 }
58 58
59 DocumentThreadableLoader::loadResourceSynchronously(toDocument(context), req uest, client, options, resourceLoaderOptions); 59 DocumentThreadableLoader::loadResourceSynchronously(toDocument(context), req uest, client, options, resourceLoaderOptions);
60 } 60 }
61 61
62 } // namespace blink 62 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698