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

Side by Side Diff: Source/bindings/v8/ExceptionStatePlaceholder.h

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 | « no previous file | Source/core/accessibility/AccessibilityRenderObject.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 typedef int ExceptionCode; 42 typedef int ExceptionCode;
43 43
44 class IgnorableExceptionState : public ExceptionState { 44 class IgnorableExceptionState : public ExceptionState {
45 public: 45 public:
46 IgnorableExceptionState(): ExceptionState(0) { } 46 IgnorableExceptionState(): ExceptionState(0) { }
47 ExceptionState& returnThis() { return *this; } 47 ExceptionState& returnThis() { return *this; }
48 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE FINAL { }; 48 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE FINAL { };
49 virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL { } 49 virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL { }
50 }; 50 };
51 51
52 #define IGNORE_EXCEPTION_STATE (::WebCore::IgnorableExceptionState().returnThis( )) 52 #define IGNORE_EXCEPTION (::WebCore::IgnorableExceptionState().returnThis())
53 53
54 #if ASSERT_DISABLED 54 #if ASSERT_DISABLED
55 55
56 #define ASSERT_NO_EXCEPTION_STATE (::WebCore::IgnorableExceptionState().returnTh is()) 56 #define ASSERT_NO_EXCEPTION (::WebCore::IgnorableExceptionState().returnThis())
57 57
58 #else 58 #else
59 59
60 class NoExceptionStateAssertionChecker : public ExceptionState { 60 class NoExceptionStateAssertionChecker : public ExceptionState {
61 public: 61 public:
62 NoExceptionStateAssertionChecker(const char* file, int line); 62 NoExceptionStateAssertionChecker(const char* file, int line);
63 ExceptionState& returnThis() { return *this; } 63 ExceptionState& returnThis() { return *this; }
64 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE FINAL; 64 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE FINAL;
65 virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL ; 65 virtual void throwTypeError(const String& message = String()) OVERRIDE FINAL ;
66 66
67 private: 67 private:
68 const char* m_file; 68 const char* m_file;
69 int m_line; 69 int m_line;
70 }; 70 };
71 71
72 #define ASSERT_NO_EXCEPTION_STATE (::WebCore::NoExceptionStateAssertionChecker(_ _FILE__, __LINE__).returnThis()) 72 #define ASSERT_NO_EXCEPTION (::WebCore::NoExceptionStateAssertionChecker(__FILE_ _, __LINE__).returnThis())
73 73
74 #endif 74 #endif
75 75
76 } // namespace WebCore 76 } // namespace WebCore
77 77
78 #endif // ExceptionStatePlaceholder_h 78 #endif // ExceptionStatePlaceholder_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/accessibility/AccessibilityRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698