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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h

Issue 2298753002: binding: Updates ExceptionStatePlaceholder according to ExceptionState. (Closed)
Patch Set: Created 4 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: third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h b/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h
index db0be6432a58310e25c7bd5821db16bd0f1a210f..413b0a8769c3dc943d5fc8873b29a1914b32d2a5 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ExceptionStatePlaceholder.h
@@ -35,22 +35,22 @@
#include "core/CoreExport.h"
#include "wtf/Assertions.h"
#include "wtf/text/WTFString.h"
-#include <v8.h>
namespace blink {
-class ExceptionState;
-
-typedef int ExceptionCode;
-
class IgnorableExceptionState final : public ExceptionState {
WTF_MAKE_NONCOPYABLE(IgnorableExceptionState);
public:
- IgnorableExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Local<v8::Object>(), 0) { }
+ IgnorableExceptionState()
+ : ExceptionState(nullptr, ExceptionState::UnknownContext, nullptr, nullptr) { }
+
ExceptionState& returnThis() { return *this; }
- void throwDOMException(const ExceptionCode&, const String& message = String()) override { }
- void throwTypeError(const String& message = String()) override { }
- void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) override { }
+
+ void throwDOMException(const 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())
@@ -61,14 +61,18 @@ class CORE_EXPORT NoExceptionStateAssertionChecker final : public ExceptionState
WTF_MAKE_NONCOPYABLE(NoExceptionStateAssertionChecker);
public:
NoExceptionStateAssertionChecker(const char* file, int line);
+
ExceptionState& returnThis() { return *this; }
- void throwDOMException(const ExceptionCode&, const String& message = String()) override;
- void throwTypeError(const String& message = String()) override;
- void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) override;
+
+ void throwDOMException(const 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;
private:
const char* m_file;
- int m_line;
+ const int m_line;
};
#define ASSERT_NO_EXCEPTION (::blink::NoExceptionStateAssertionChecker(__FILE__, __LINE__).returnThis())

Powered by Google App Engine
This is Rietveld 408576698