Index: Source/bindings/core/v8/ExceptionState.cpp |
diff --git a/Source/bindings/core/v8/ExceptionState.cpp b/Source/bindings/core/v8/ExceptionState.cpp |
index 96ad0d8a027c1cad3bad7f7c89c03589620906c1..134a447cadf2a600dc6c1b8a041288fdaadcf4ba 100644 |
--- a/Source/bindings/core/v8/ExceptionState.cpp |
+++ b/Source/bindings/core/v8/ExceptionState.cpp |
@@ -32,6 +32,7 @@ |
#include "bindings/core/v8/ExceptionState.h" |
#include "bindings/core/v8/ExceptionMessages.h" |
+#include "bindings/core/v8/ScriptPromiseResolver.h" |
#include "bindings/core/v8/V8ThrowException.h" |
#include "core/dom/ExceptionCode.h" |
@@ -50,6 +51,12 @@ ScriptPromise ExceptionState::reject(ScriptState* scriptState) |
return promise; |
} |
+void ExceptionState::reject(ScriptPromiseResolver* resolver) |
+{ |
+ resolver->reject(m_exception.newLocal(resolver->scriptState()->isolate())); |
+ clearException(); |
+} |
+ |
void ExceptionState::throwDOMException(const ExceptionCode& ec, const String& message) |
{ |
ASSERT(ec); |