| OLD | NEW |
| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void throwException(); | 119 void throwException(); |
| 120 | 120 |
| 121 String addExceptionContext(const String&) const; | 121 String addExceptionContext(const String&) const; |
| 122 | 122 |
| 123 ScopedPersistent<v8::Value> m_exception; | 123 ScopedPersistent<v8::Value> m_exception; |
| 124 v8::Handle<v8::Object> m_creationContext; | 124 v8::Handle<v8::Object> m_creationContext; |
| 125 v8::Isolate* m_isolate; | 125 v8::Isolate* m_isolate; |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 // Used if exceptions can/should not be directly thrown. | 128 // Used if exceptions can/should not be directly thrown. |
| 129 class NonThrowableExceptionState FINAL : public ExceptionState { | 129 class NonThrowableExceptionState final : public ExceptionState { |
| 130 public: | 130 public: |
| 131 NonThrowableExceptionState(): ExceptionState(ExceptionState::UnknownContext,
0, 0, v8::Handle<v8::Object>(), v8::Isolate::GetCurrent()) { } | 131 NonThrowableExceptionState(): ExceptionState(ExceptionState::UnknownContext,
0, 0, v8::Handle<v8::Object>(), v8::Isolate::GetCurrent()) { } |
| 132 virtual void throwDOMException(const ExceptionCode&, const String& message)
OVERRIDE; | 132 virtual void throwDOMException(const ExceptionCode&, const String& message)
override; |
| 133 virtual void throwTypeError(const String& message = String()) OVERRIDE; | 133 virtual void throwTypeError(const String& message = String()) override; |
| 134 virtual void throwSecurityError(const String& sanitizedMessage, const String
& unsanitizedMessage = String()) OVERRIDE; | 134 virtual void throwSecurityError(const String& sanitizedMessage, const String
& unsanitizedMessage = String()) override; |
| 135 virtual void throwRangeError(const String& message) OVERRIDE; | 135 virtual void throwRangeError(const String& message) override; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 // Used if any exceptions thrown are ignorable. | 138 // Used if any exceptions thrown are ignorable. |
| 139 class TrackExceptionState FINAL : public ExceptionState { | 139 class TrackExceptionState final : public ExceptionState { |
| 140 public: | 140 public: |
| 141 TrackExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0,
v8::Handle<v8::Object>(), v8::Isolate::GetCurrent()) { } | 141 TrackExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0,
v8::Handle<v8::Object>(), v8::Isolate::GetCurrent()) { } |
| 142 virtual void throwDOMException(const ExceptionCode&, const String& message)
OVERRIDE; | 142 virtual void throwDOMException(const ExceptionCode&, const String& message)
override; |
| 143 virtual void throwTypeError(const String& message = String()) OVERRIDE; | 143 virtual void throwTypeError(const String& message = String()) override; |
| 144 virtual void throwSecurityError(const String& sanitizedMessage, const String
& unsanitizedMessage = String()) OVERRIDE; | 144 virtual void throwSecurityError(const String& sanitizedMessage, const String
& unsanitizedMessage = String()) override; |
| 145 virtual void throwRangeError(const String& message) OVERRIDE; | 145 virtual void throwRangeError(const String& message) override; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace blink | 148 } // namespace blink |
| 149 | 149 |
| 150 #endif // ExceptionState_h | 150 #endif // ExceptionState_h |
| OLD | NEW |