| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef ICUError_h | 5 #ifndef ICUError_h |
| 6 #define ICUError_h | 6 #define ICUError_h |
| 7 | 7 |
| 8 #include <unicode/utypes.h> |
| 8 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
| 9 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 10 #include "wtf/Assertions.h" | 11 #include "wtf/Assertions.h" |
| 11 #include <unicode/utypes.h> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 // ICUError provides the unified way to handle ICU errors in Blink. | 15 // ICUError provides the unified way to handle ICU errors in Blink. |
| 16 class PLATFORM_EXPORT ICUError { | 16 class PLATFORM_EXPORT ICUError { |
| 17 STACK_ALLOCATED(); | 17 STACK_ALLOCATED(); |
| 18 | 18 |
| 19 public: | 19 public: |
| 20 ~ICUError() { crashIfCritical(); } | 20 ~ICUError() { crashIfCritical(); } |
| 21 | 21 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 }; | 35 }; |
| 36 | 36 |
| 37 inline void ICUError::crashIfCritical() { | 37 inline void ICUError::crashIfCritical() { |
| 38 if (U_FAILURE(m_error)) | 38 if (U_FAILURE(m_error)) |
| 39 handleFailure(); | 39 handleFailure(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace blink | 42 } // namespace blink |
| 43 | 43 |
| 44 #endif // ICUError_h | 44 #endif // ICUError_h |
| OLD | NEW |