| 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 27 matching lines...) Expand all Loading... |
| 38 #include <v8.h> | 38 #include <v8.h> |
| 39 | 39 |
| 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::Handle<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 virtual void throwDOMException(const ExceptionCode&, const String& message =
String()) override { } |
| 51 virtual void throwTypeError(const String& message = String()) override { } | 51 virtual void throwTypeError(const String& message = String()) override { } |
| 52 virtual void throwSecurityError(const String& sanitizedMessage, const String
& unsanitizedMessage = String()) override { } | 52 virtual void throwSecurityError(const String& sanitizedMessage, const String
& unsanitizedMessage = 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 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 |
| OLD | NEW |