Commit 7254e350 authored by haraken's avatar haraken Committed by Commit bot

Remove IgnorableExceptionState

IgnorableExceptionState is equivalent to DummyExceptionStateForTesting.
We should just use DummyExceptionStateForTesting.

BUG=

Review-Url: https://codereview.chromium.org/2614013003
Cr-Commit-Position: refs/heads/master@{#441871}
parent e5e6f6ee
...@@ -187,13 +187,13 @@ class CORE_EXPORT DummyExceptionStateForTesting final : public ExceptionState { ...@@ -187,13 +187,13 @@ class CORE_EXPORT DummyExceptionStateForTesting final : public ExceptionState {
clearException(); clearException();
} }
} }
void throwDOMException(ExceptionCode, const String& message) override; void throwDOMException(ExceptionCode, const String& message) override;
void throwTypeError(const String& message) override; void throwTypeError(const String& message) override;
void throwSecurityError(const String& sanitizedMessage, void throwSecurityError(const String& sanitizedMessage,
const String& unsanitizedMessage) override; const String& unsanitizedMessage) override;
void throwRangeError(const String& message) override; void throwRangeError(const String& message) override;
void rethrowV8Exception(v8::Local<v8::Value>) override; void rethrowV8Exception(v8::Local<v8::Value>) override;
ExceptionState& returnThis() { return *this; }
}; };
} // namespace blink } // namespace blink
......
...@@ -38,27 +38,7 @@ ...@@ -38,27 +38,7 @@
namespace blink { namespace blink {
class IgnorableExceptionState final : public ExceptionState { #define IGNORE_EXCEPTION (::blink::DummyExceptionStateForTesting().returnThis())
WTF_MAKE_NONCOPYABLE(IgnorableExceptionState);
public:
IgnorableExceptionState()
: ExceptionState(nullptr,
ExceptionState::UnknownContext,
nullptr,
nullptr) {}
ExceptionState& returnThis() { return *this; }
void throwDOMException(ExceptionCode, const String& message) override {}
void throwRangeError(const String& message) override{};
void throwSecurityError(const String& sanitizedMessage,
const String& unsanitizedMessage) override {}
void throwTypeError(const String& message) override {}
void rethrowV8Exception(v8::Local<v8::Value>) override{};
};
#define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().returnThis())
#if ENABLE(ASSERT) #if ENABLE(ASSERT)
...@@ -88,7 +68,8 @@ class CORE_EXPORT NoExceptionStateAssertionChecker final ...@@ -88,7 +68,8 @@ class CORE_EXPORT NoExceptionStateAssertionChecker final
#else #else
#define ASSERT_NO_EXCEPTION (::blink::IgnorableExceptionState().returnThis()) #define ASSERT_NO_EXCEPTION \
(::blink::DummyExceptionStateForTesting().returnThis())
#endif #endif
......
...@@ -210,7 +210,7 @@ IntersectionObserver::IntersectionObserver( ...@@ -210,7 +210,7 @@ IntersectionObserver::IntersectionObserver(
void IntersectionObserver::clearWeakMembers(Visitor* visitor) { void IntersectionObserver::clearWeakMembers(Visitor* visitor) {
if (ThreadHeap::isHeapObjectAlive(root())) if (ThreadHeap::isHeapObjectAlive(root()))
return; return;
IgnorableExceptionState exceptionState; DummyExceptionStateForTesting exceptionState;
disconnect(exceptionState); disconnect(exceptionState);
m_root = nullptr; m_root = nullptr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment