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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/text/BidiResolver.h ('k') | Source/platform/weborigin/KnownPorts.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 29 matching lines...) Expand all
40 #include <stdio.h> 40 #include <stdio.h>
41 #endif 41 #endif
42 42
43 namespace WebCore { 43 namespace WebCore {
44 44
45 static const int maximumValidPortNumber = 0xFFFE; 45 static const int maximumValidPortNumber = 0xFFFE;
46 static const int invalidPortNumber = 0xFFFF; 46 static const int invalidPortNumber = 0xFFFF;
47 47
48 static void assertProtocolIsGood(const char* protocol) 48 static void assertProtocolIsGood(const char* protocol)
49 { 49 {
50 #ifndef NDEBUG 50 #if ENABLE(ASSERT)
51 const char* p = protocol; 51 const char* p = protocol;
52 while (*p) { 52 while (*p) {
53 ASSERT(*p > ' ' && *p < 0x7F && !(*p >= 'A' && *p <= 'Z')); 53 ASSERT(*p > ' ' && *p < 0x7F && !(*p >= 'A' && *p <= 'Z'));
54 ++p; 54 ++p;
55 } 55 }
56 #endif 56 #endif
57 } 57 }
58 58
59 // Note: You must ensure that |spec| is a valid canonicalized URL before calling this function. 59 // Note: You must ensure that |spec| is a valid canonicalized URL before calling this function.
60 static const char* asURLChar8Subtle(const String& spec) 60 static const char* asURLChar8Subtle(const String& spec)
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 m_string = AtomicString::fromUTF8(output.data(), output.length()); 913 m_string = AtomicString::fromUTF8(output.data(), output.length());
914 } 914 }
915 915
916 bool KURL::isSafeToSendToAnotherThread() const 916 bool KURL::isSafeToSendToAnotherThread() const
917 { 917 {
918 return m_string.isSafeToSendToAnotherThread() 918 return m_string.isSafeToSendToAnotherThread()
919 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread()); 919 && (!m_innerURL || m_innerURL->isSafeToSendToAnotherThread());
920 } 920 }
921 921
922 } // namespace WebCore 922 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/platform/text/BidiResolver.h ('k') | Source/platform/weborigin/KnownPorts.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698