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

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

Issue 232563003: API functions returning Promises should not throw exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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
Index: Source/bindings/core/v8/ExceptionState.h
diff --git a/Source/bindings/core/v8/ExceptionState.h b/Source/bindings/core/v8/ExceptionState.h
index 5050237d22b1d82204d5793460c720c9aa6b9bc5..32fb1d5f0a7f029ce35c66c48d6b1c271bcbaf8a 100644
--- a/Source/bindings/core/v8/ExceptionState.h
+++ b/Source/bindings/core/v8/ExceptionState.h
@@ -32,6 +32,7 @@
#define ExceptionState_h
#include "bindings/core/v8/ScopedPersistent.h"
+#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/V8ThrowException.h"
#include "wtf/Noncopyable.h"
#include "wtf/text/WTFString.h"
@@ -40,6 +41,7 @@
namespace blink {
typedef int ExceptionCode;
+class ScriptState;
class ExceptionState {
WTF_MAKE_NONCOPYABLE(ExceptionState);
@@ -93,6 +95,9 @@ public:
return true;
}
+ // This method clears out the exception which |this| has.
+ ScriptPromise reject(ScriptState*);
+
Context context() const { return m_context; }
const char* propertyName() const { return m_propertyName; }
const char* interfaceName() const { return m_interfaceName; }
« no previous file with comments | « LayoutTests/fast/js/Promise-bindings-check-exception-expected.txt ('k') | Source/bindings/core/v8/ExceptionState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698