Index: Source/bindings/v8/ScriptPromiseResolverWithContext.cpp |
diff --git a/Source/bindings/v8/ScriptPromiseResolverWithContext.cpp b/Source/bindings/v8/ScriptPromiseResolverWithContext.cpp |
index 6b750dd26685766af31b5ed4995c63995ed38233..6cd7ab8b5ef130ea5f276923c07a6949882936de 100644 |
--- a/Source/bindings/v8/ScriptPromiseResolverWithContext.cpp |
+++ b/Source/bindings/v8/ScriptPromiseResolverWithContext.cpp |
@@ -16,20 +16,14 @@ ScriptPromiseResolverWithContext::ScriptPromiseResolverWithContext(ScriptState* |
, m_mode(Default) |
, m_timer(this, &ScriptPromiseResolverWithContext::onTimerFired) |
, m_resolver(ScriptPromiseResolver::create(m_scriptState.get())) |
+#if ASSERTION_ENABLED |
+ , m_isPromiseCalled(false) |
+#endif |
{ |
if (executionContext()->activeDOMObjectsAreStopped()) |
m_state = ResolvedOrRejected; |
} |
-ScriptPromiseResolverWithContext::~ScriptPromiseResolverWithContext() |
-{ |
- if (m_state != ResolvedOrRejected) { |
- ScriptState::Scope scope(m_scriptState.get()); |
- reject(v8::Exception::Error(v8::String::NewFromUtf8(m_scriptState->isolate(), |
- "ScriptPromiseResolverWithContext is destructed without resolve / reject"))); |
- } |
-} |
- |
void ScriptPromiseResolverWithContext::suspend() |
{ |
m_timer.stop(); |
@@ -92,7 +86,7 @@ void ScriptPromiseResolverWithContext::clear() |
m_resolver.clear(); |
m_value.clear(); |
if (m_mode == KeepAliveWhilePending) { |
- // |ref| was called in the constructor. |
+ // |ref| was called in |keepAliveWhilePending|. |
deref(); |
} |
// |this| may be deleted here, but it is safe to check |state| because |