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

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

Issue 1236473002: Fix virtual/override/final usage in Source/bindings/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
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 29 matching lines...) Expand all
40 namespace blink { 40 namespace blink {
41 41
42 class ExceptionState; 42 class ExceptionState;
43 43
44 typedef int ExceptionCode; 44 typedef int ExceptionCode;
45 45
46 class IgnorableExceptionState final : public ExceptionState { 46 class IgnorableExceptionState final : public ExceptionState {
47 public: 47 public:
48 IgnorableExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Local<v8::Object>(), 0) { } 48 IgnorableExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Local<v8::Object>(), 0) { }
49 ExceptionState& returnThis() { return *this; } 49 ExceptionState& returnThis() { return *this; }
50 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) override { } 50 void throwDOMException(const ExceptionCode&, const String& message = String( )) override { }
51 virtual void throwTypeError(const String& message = String()) override { } 51 void throwTypeError(const String& message = String()) override { }
52 virtual void throwSecurityError(const String& sanitizedMessage, const String & unsanitizedMessage = String()) override { } 52 void throwSecurityError(const String& sanitizedMessage, const String& unsani tizedMessage = String()) override { }
53 }; 53 };
54 54
55 #define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().returnThis()) 55 #define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().returnThis())
56 56
57 #if ENABLE(ASSERT) 57 #if ENABLE(ASSERT)
58 58
59 class CORE_EXPORT NoExceptionStateAssertionChecker final : public ExceptionState { 59 class CORE_EXPORT NoExceptionStateAssertionChecker final : public ExceptionState {
60 public: 60 public:
61 NoExceptionStateAssertionChecker(const char* file, int line); 61 NoExceptionStateAssertionChecker(const char* file, int line);
62 ExceptionState& returnThis() { return *this; } 62 ExceptionState& returnThis() { return *this; }
63 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) override; 63 void throwDOMException(const ExceptionCode&, const String& message = String( )) override;
64 virtual void throwTypeError(const String& message = String()) override; 64 void throwTypeError(const String& message = String()) override;
65 virtual void throwSecurityError(const String& sanitizedMessage, const String & unsanitizedMessage = String()) override; 65 void throwSecurityError(const String& sanitizedMessage, const String& unsani tizedMessage = String()) override;
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 (::blink::NoExceptionStateAssertionChecker(__FILE__, __LINE__).returnThis()) 72 #define ASSERT_NO_EXCEPTION (::blink::NoExceptionStateAssertionChecker(__FILE__, __LINE__).returnThis())
73 73
74 #else 74 #else
75 75
76 #define ASSERT_NO_EXCEPTION (::blink::IgnorableExceptionState().returnThis()) 76 #define ASSERT_NO_EXCEPTION (::blink::IgnorableExceptionState().returnThis())
77 77
78 #endif 78 #endif
79 79
80 } // namespace blink 80 } // namespace blink
81 81
82 #endif // ExceptionStatePlaceholder_h 82 #endif // ExceptionStatePlaceholder_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ExceptionState.h ('k') | Source/bindings/core/v8/ScriptHeapSnapshot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698