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

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

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: m_domTreeVersion initialization Created 3 years, 11 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 30 matching lines...) Expand all
41 #ifndef NDEBUG 41 #ifndef NDEBUG
42 #include <stdio.h> 42 #include <stdio.h>
43 #endif 43 #endif
44 44
45 namespace blink { 45 namespace blink {
46 46
47 static const int maximumValidPortNumber = 0xFFFE; 47 static const int maximumValidPortNumber = 0xFFFE;
48 static const int invalidPortNumber = 0xFFFF; 48 static const int invalidPortNumber = 0xFFFF;
49 49
50 static void assertProtocolIsGood(const char* protocol) { 50 static void assertProtocolIsGood(const char* protocol) {
51 #if ENABLE(ASSERT) 51 #if DCHECK_IS_ON()
52 DCHECK_NE(protocol, ""); 52 DCHECK_NE(protocol, "");
53 const char* p = protocol; 53 const char* p = protocol;
54 while (*p) { 54 while (*p) {
55 ASSERT(*p > ' ' && *p < 0x7F && !(*p >= 'A' && *p <= 'Z')); 55 ASSERT(*p > ' ' && *p < 0x7F && !(*p >= 'A' && *p <= 'Z'));
56 ++p; 56 ++p;
57 } 57 }
58 #endif 58 #endif
59 } 59 }
60 60
61 // Note: You must ensure that |spec| is a valid canonicalized URL before calling 61 // Note: You must ensure that |spec| is a valid canonicalized URL before calling
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 m_string = AtomicString::fromUTF8(output.data(), output.length()); 865 m_string = AtomicString::fromUTF8(output.data(), output.length());
866 initProtocolMetadata(); 866 initProtocolMetadata();
867 } 867 }
868 868
869 bool KURL::isSafeToSendToAnotherThread() const { 869 bool KURL::isSafeToSendToAnotherThread() const {
870 return m_string.isSafeToSendToAnotherThread() && 870 return m_string.isSafeToSendToAnotherThread() &&
871 (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 871 (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
872 } 872 }
873 873
874 } // namespace blink 874 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/text/BidiResolver.h ('k') | third_party/WebKit/Source/wtf/Assertions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698