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

Side by Side Diff: third_party/WebKit/Source/modules/fetch/Response.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
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Request.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/Response.h" 5 #include "modules/fetch/Response.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "bindings/core/v8/Dictionary.h" 8 #include "bindings/core/v8/Dictionary.h"
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 return "cors"; 328 return "cors";
329 case FetchResponseData::kDefaultType: 329 case FetchResponseData::kDefaultType:
330 return "default"; 330 return "default";
331 case FetchResponseData::kErrorType: 331 case FetchResponseData::kErrorType:
332 return "error"; 332 return "error";
333 case FetchResponseData::kOpaqueType: 333 case FetchResponseData::kOpaqueType:
334 return "opaque"; 334 return "opaque";
335 case FetchResponseData::kOpaqueRedirectType: 335 case FetchResponseData::kOpaqueRedirectType:
336 return "opaqueredirect"; 336 return "opaqueredirect";
337 } 337 }
338 ASSERT_NOT_REACHED(); 338 NOTREACHED();
339 return ""; 339 return "";
340 } 340 }
341 341
342 String Response::url() const { 342 String Response::url() const {
343 // "The url attribute's getter must return the empty string if response's 343 // "The url attribute's getter must return the empty string if response's
344 // url is null and response's url, serialized with the exclude fragment 344 // url is null and response's url, serialized with the exclude fragment
345 // flag set, otherwise." 345 // flag set, otherwise."
346 const KURL* response_url = response_->Url(); 346 const KURL* response_url = response_->Url();
347 if (!response_url) 347 if (!response_url)
348 return g_empty_string; 348 return g_empty_string;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 .Set(response.As<v8::Object>(), body_buffer); 463 .Set(response.As<v8::Object>(), body_buffer);
464 } 464 }
465 465
466 DEFINE_TRACE(Response) { 466 DEFINE_TRACE(Response) {
467 Body::Trace(visitor); 467 Body::Trace(visitor);
468 visitor->Trace(response_); 468 visitor->Trace(response_);
469 visitor->Trace(headers_); 469 visitor->Trace(headers_);
470 } 470 }
471 471
472 } // namespace blink 472 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/fetch/Request.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698