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

Unified Diff: sky/engine/bindings-dart/common/ExceptionStatePlaceholder.h

Issue 875013003: Import Dart bindings as of Blink r188698. This merely copies the files over and does not attach any… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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: sky/engine/bindings-dart/common/ExceptionStatePlaceholder.h
diff --git a/sky/engine/bindings/core/v8/ExceptionStatePlaceholder.h b/sky/engine/bindings-dart/common/ExceptionStatePlaceholder.h
similarity index 64%
copy from sky/engine/bindings/core/v8/ExceptionStatePlaceholder.h
copy to sky/engine/bindings-dart/common/ExceptionStatePlaceholder.h
index 4d8fe54035534983beb86f3883c36a890f62c39b..cc13ccfc849e5030331b89c76a5d40bb67cf5859 100644
--- a/sky/engine/bindings/core/v8/ExceptionStatePlaceholder.h
+++ b/sky/engine/bindings-dart/common/ExceptionStatePlaceholder.h
@@ -28,13 +28,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef SKY_ENGINE_BINDINGS_CORE_V8_EXCEPTIONSTATEPLACEHOLDER_H_
-#define SKY_ENGINE_BINDINGS_CORE_V8_EXCEPTIONSTATEPLACEHOLDER_H_
+#ifndef ExceptionStatePlaceholder_h
+#define ExceptionStatePlaceholder_h
-#include "sky/engine/bindings/core/v8/ExceptionState.h"
-#include "sky/engine/wtf/Assertions.h"
-#include "sky/engine/wtf/text/WTFString.h"
-#include "v8/include/v8.h"
+#include "bindings/common/ExceptionState.h"
+#include <v8.h>
+#include "wtf/Assertions.h"
+#include "wtf/text/WTFString.h"
+#include <v8.h>
namespace blink {
@@ -42,26 +43,40 @@ class ExceptionState;
typedef int ExceptionCode;
-class IgnorableExceptionState final : public ExceptionState {
+class IgnorableExceptionState FINAL : public ExceptionState {
public:
- IgnorableExceptionState(): ExceptionState(ExceptionState::UnknownContext, 0, 0, v8::Handle<v8::Object>(), 0) { }
+ IgnorableExceptionState(): ExceptionState() { }
ExceptionState& returnThis() { return *this; }
- virtual void throwDOMException(const ExceptionCode&, const String& message = String()) override { }
- virtual void throwTypeError(const String& message = String()) override { }
- virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) override { }
+ virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE { }
+ virtual void throwTypeError(const String& message = String()) OVERRIDE { }
+ virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) OVERRIDE { }
+ virtual void throwRangeError(const String& message = String()) OVERRIDE { }
+ virtual void rethrowV8Exception(v8::Handle<v8::Value> value) OVERRIDE { }
+ virtual void clearException() OVERRIDE FINAL { }
+ virtual void throwException() OVERRIDE FINAL { }
+ virtual ScriptPromise reject(ScriptState* state) OVERRIDE FINAL { return ScriptPromise::empty(state); }
};
#define IGNORE_EXCEPTION (::blink::IgnorableExceptionState().returnThis())
#if ENABLE(ASSERT)
-class NoExceptionStateAssertionChecker final : public ExceptionState {
+class NoExceptionStateAssertionChecker FINAL : public ExceptionState {
public:
NoExceptionStateAssertionChecker(const char* file, int line);
ExceptionState& returnThis() { return *this; }
- virtual void throwDOMException(const ExceptionCode&, const String& message = String()) override;
- virtual void throwTypeError(const String& message = String()) override;
- virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) override;
+ virtual void throwDOMException(const ExceptionCode&, const String& message = String()) OVERRIDE;
+ virtual void throwTypeError(const String& message = String()) OVERRIDE;
+ virtual void throwSecurityError(const String& sanitizedMessage, const String& unsanitizedMessage = String()) OVERRIDE;
+ virtual void throwRangeError(const String& message = String()) OVERRIDE;
+ virtual void rethrowV8Exception(v8::Handle<v8::Value> value) OVERRIDE;
+ virtual void clearException() OVERRIDE FINAL { }
+ virtual void throwException() OVERRIDE FINAL { ASSERT_NOT_REACHED(); }
+ virtual ScriptPromise reject(ScriptState*) OVERRIDE FINAL
+ {
+ ASSERT_NOT_REACHED();
+ return ScriptPromise(nullptr);
+ }
private:
const char* m_file;
@@ -78,4 +93,4 @@ private:
} // namespace blink
-#endif // SKY_ENGINE_BINDINGS_CORE_V8_EXCEPTIONSTATEPLACEHOLDER_H_
+#endif // ExceptionStatePlaceholder_h
« no previous file with comments | « sky/engine/bindings-dart/common/ExceptionState.h ('k') | sky/engine/bindings-dart/common/ExceptionStatePlaceholder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698