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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/KURL.cpp

Issue 2896443003: Replace remaining ASSERT with DCHECK/_EQ as appropriate (Closed)
Patch Set: actually fix WorkerBackingthread 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 /* 1 /*
2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 bool KURL::ProtocolIs(const StringView protocol) const { 827 bool KURL::ProtocolIs(const StringView protocol) const {
828 #if DCHECK_IS_ON() 828 #if DCHECK_IS_ON()
829 AssertProtocolIsGood(protocol); 829 AssertProtocolIsGood(protocol);
830 #endif 830 #endif
831 831
832 // JavaScript URLs are "valid" and should be executed even if KURL decides 832 // JavaScript URLs are "valid" and should be executed even if KURL decides
833 // they are invalid. The free function protocolIsJavaScript() should be used 833 // they are invalid. The free function protocolIsJavaScript() should be used
834 // instead. 834 // instead.
835 // FIXME: Chromium code needs to be fixed for this assert to be enabled. 835 // FIXME: Chromium code needs to be fixed for this assert to be enabled.
836 // ASSERT(strcmp(protocol, "javascript")); 836 // DCHECK(strcmp(protocol, "javascript"));
837 return protocol_ == protocol; 837 return protocol_ == protocol;
838 } 838 }
839 839
840 StringView KURL::StringViewForInvalidComponent() const { 840 StringView KURL::StringViewForInvalidComponent() const {
841 return string_.IsNull() ? StringView() : StringView(StringImpl::empty_); 841 return string_.IsNull() ? StringView() : StringView(StringImpl::empty_);
842 } 842 }
843 843
844 StringView KURL::ComponentStringView(const url::Component& component) const { 844 StringView KURL::ComponentStringView(const url::Component& component) const {
845 if (!is_valid_ || component.len <= 0) 845 if (!is_valid_ || component.len <= 0)
846 return StringViewForInvalidComponent(); 846 return StringViewForInvalidComponent();
(...skipping 28 matching lines...) Expand all
875 string_ = AtomicString::FromUTF8(output.data(), output.length()); 875 string_ = AtomicString::FromUTF8(output.data(), output.length());
876 InitProtocolMetadata(); 876 InitProtocolMetadata();
877 } 877 }
878 878
879 bool KURL::IsSafeToSendToAnotherThread() const { 879 bool KURL::IsSafeToSendToAnotherThread() const {
880 return string_.IsSafeToSendToAnotherThread() && 880 return string_.IsSafeToSendToAnotherThread() &&
881 (!inner_url_ || inner_url_->IsSafeToSendToAnotherThread()); 881 (!inner_url_ || inner_url_->IsSafeToSendToAnotherThread());
882 } 882 }
883 883
884 } // namespace blink 884 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/mojo/ReferrerStructTraits.h ('k') | third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698