Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: Source/bindings/core/v8/ExceptionState.cpp

Issue 1210633002: Update navigator.services API to use the new services.onconnect event [1/3]. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@serviceport-part3
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/ExceptionState.h ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/bindings/core/v8/ExceptionState.h ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698