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

Side by Side Diff: third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp

Issue 2862963003: Replace ASSERT with DCHECK in modules/ (Closed)
Patch Set: NOTREACHED instead of DCHECK(false) Created 3 years, 7 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/cachestorage/CacheStorage.h" 5 #include "modules/cachestorage/CacheStorage.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 else 302 else
303 resolver->Reject(CreateNoImplementationException()); 303 resolver->Reject(CreateNoImplementationException());
304 304
305 return promise; 305 return promise;
306 } 306 }
307 307
308 ScriptPromise CacheStorage::match(ScriptState* script_state, 308 ScriptPromise CacheStorage::match(ScriptState* script_state,
309 const RequestInfo& request, 309 const RequestInfo& request,
310 const CacheQueryOptions& options, 310 const CacheQueryOptions& options,
311 ExceptionState& exception_state) { 311 ExceptionState& exception_state) {
312 ASSERT(!request.isNull()); 312 DCHECK(!request.isNull());
313 if (!CommonChecks(script_state, exception_state)) 313 if (!CommonChecks(script_state, exception_state))
314 return ScriptPromise(); 314 return ScriptPromise();
315 315
316 if (request.isRequest()) 316 if (request.isRequest())
317 return MatchImpl(script_state, request.getAsRequest(), options); 317 return MatchImpl(script_state, request.getAsRequest(), options);
318 Request* new_request = 318 Request* new_request =
319 Request::Create(script_state, request.getAsUSVString(), exception_state); 319 Request::Create(script_state, request.getAsUSVString(), exception_state);
320 if (exception_state.HadException()) 320 if (exception_state.HadException())
321 return ScriptPromise(); 321 return ScriptPromise();
322 return MatchImpl(script_state, new_request, options); 322 return MatchImpl(script_state, new_request, options);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 void CacheStorage::Dispose() { 357 void CacheStorage::Dispose() {
358 web_cache_storage_.reset(); 358 web_cache_storage_.reset();
359 } 359 }
360 360
361 DEFINE_TRACE(CacheStorage) { 361 DEFINE_TRACE(CacheStorage) {
362 visitor->Trace(scoped_fetcher_); 362 visitor->Trace(scoped_fetcher_);
363 } 363 }
364 364
365 } // namespace blink 365 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/cachestorage/Cache.cpp ('k') | third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698