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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/FetchManager.cpp

Issue 2823203003: Replace ASSERT_NOT_REACHED with NOTREACHED in modules/fetch (Closed)
Patch Set: Created 3 years, 8 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/fetch/FetchManager.h" 5 #include "modules/fetch/FetchManager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/ExceptionState.h" 8 #include "bindings/core/v8/ExceptionState.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 "mode is \"no-cors\"."); 375 "mode is \"no-cors\".");
376 return; 376 return;
377 } 377 }
378 } 378 }
379 } else if (!SecurityOrigin::Create(response.Url()) 379 } else if (!SecurityOrigin::Create(response.Url())
380 ->IsSameSchemeHostPort(request_->Origin().Get())) { 380 ->IsSameSchemeHostPort(request_->Origin().Get())) {
381 // Recompute the tainting if the request was redirected to a different 381 // Recompute the tainting if the request was redirected to a different
382 // origin. 382 // origin.
383 switch (request_->Mode()) { 383 switch (request_->Mode()) {
384 case WebURLRequest::kFetchRequestModeSameOrigin: 384 case WebURLRequest::kFetchRequestModeSameOrigin:
385 ASSERT_NOT_REACHED(); 385 NOTREACHED();
386 break; 386 break;
387 case WebURLRequest::kFetchRequestModeNoCORS: 387 case WebURLRequest::kFetchRequestModeNoCORS:
388 tainting = FetchRequestData::kOpaqueTainting; 388 tainting = FetchRequestData::kOpaqueTainting;
389 break; 389 break;
390 case WebURLRequest::kFetchRequestModeCORS: 390 case WebURLRequest::kFetchRequestModeCORS:
391 case WebURLRequest::kFetchRequestModeCORSWithForcedPreflight: 391 case WebURLRequest::kFetchRequestModeCORSWithForcedPreflight:
392 tainting = FetchRequestData::kCORSTainting; 392 tainting = FetchRequestData::kCORSTainting;
393 break; 393 break;
394 case WebURLRequest::kFetchRequestModeNavigate: 394 case WebURLRequest::kFetchRequestModeNavigate:
395 LOG(FATAL); 395 LOG(FATAL);
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 loaders_.erase(loader); 921 loaders_.erase(loader);
922 loader->Dispose(); 922 loader->Dispose();
923 } 923 }
924 924
925 DEFINE_TRACE(FetchManager) { 925 DEFINE_TRACE(FetchManager) {
926 visitor->Trace(loaders_); 926 visitor->Trace(loaders_);
927 ContextLifecycleObserver::Trace(visitor); 927 ContextLifecycleObserver::Trace(visitor);
928 } 928 }
929 929
930 } // namespace blink 930 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698