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

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

Issue 638813002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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) 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 24 matching lines...) Expand all
35 #include "wtf/Assertions.h" 35 #include "wtf/Assertions.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 #include <v8.h> 37 #include <v8.h>
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class ExceptionState; 41 class ExceptionState;
42 42
43 typedef int ExceptionCode; 43 typedef int ExceptionCode;
44 44
45 class IgnorableExceptionState FINAL : public ExceptionState { 45 class IgnorableExceptionState final : public ExceptionState {
46 public: 46 public:
47 IgnorableExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Handle<v8::Object>(), 0) { } 47 IgnorableExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Handle<v8::Object>(), 0) { }
48 ExceptionState& returnThis() { return *this; } 48 ExceptionState& returnThis() { return *this; }
49 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE { } 49 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) override { }
50 virtual void throwTypeError(const String& message = String()) OVERRIDE { } 50 virtual void throwTypeError(const String& message = String()) override { }
51 virtual void throwSecurityError(const String& sanitizedMessage, const String & unsanitizedMessage = String()) OVERRIDE { } 51 virtual void throwSecurityError(const String& sanitizedMessage, const String & unsanitizedMessage = String()) override { }
52 }; 52 };
53 53
54 #define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().returnThis()) 54 #define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().returnThis())
55 55
56 #if ENABLE(ASSERT) 56 #if ENABLE(ASSERT)
57 57
58 class NoExceptionStateAssertionChecker FINAL : public ExceptionState { 58 class NoExceptionStateAssertionChecker final : public ExceptionState {
59 public: 59 public:
60 NoExceptionStateAssertionChecker(const char* file, int line); 60 NoExceptionStateAssertionChecker(const char* file, int line);
61 ExceptionState& returnThis() { return *this; } 61 ExceptionState& returnThis() { return *this; }
62 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE; 62 virtual void throwDOMException(const ExceptionCode&, const String& message = String()) override;
63 virtual void throwTypeError(const String& message = String()) OVERRIDE; 63 virtual void throwTypeError(const String& message = String()) override;
64 virtual void throwSecurityError(const String& sanitizedMessage, const String & unsanitizedMessage = String()) OVERRIDE; 64 virtual void throwSecurityError(const String& sanitizedMessage, const String & unsanitizedMessage = String()) override;
65 65
66 private: 66 private:
67 const char* m_file; 67 const char* m_file;
68 int m_line; 68 int m_line;
69 }; 69 };
70 70
71 #define ASSERT_NO_EXCEPTION (::blink::NoExceptionStateAssertionChecker(__FILE__, __LINE__).returnThis()) 71 #define ASSERT_NO_EXCEPTION (::blink::NoExceptionStateAssertionChecker(__FILE__, __LINE__).returnThis())
72 72
73 #else 73 #else
74 74
75 #define ASSERT_NO_EXCEPTION (::blink::IgnorableExceptionState().returnThis()) 75 #define ASSERT_NO_EXCEPTION (::blink::IgnorableExceptionState().returnThis())
76 76
77 #endif 77 #endif
78 78
79 } // namespace blink 79 } // namespace blink
80 80
81 #endif // ExceptionStatePlaceholder_h 81 #endif // ExceptionStatePlaceholder_h
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ExceptionState.h ('k') | Source/bindings/core/v8/PageScriptDebugServer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698