Index: Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8PromiseResolverCustom.cpp b/Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
index b2a364c7add90350ee416981f9db836e7b3d2cd4..190ff616c6092a467095078706393d51d954d832 100644 |
--- a/Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
+++ b/Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
@@ -31,7 +31,46 @@ |
#include "config.h" |
#include "V8PromiseResolver.h" |
+#include "bindings/v8/V8Binding.h" |
+#include "bindings/v8/custom/V8PromiseCustom.h" |
#include <v8.h> |
namespace WebCore { |
+ |
+void V8PromiseResolver::fulfillMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ v8::Isolate* isolate = args.GetIsolate(); |
+ v8::Local<v8::Value> result = v8::Undefined(); |
+ if (args.Length() > 0 && !args[0].IsEmpty()) |
+ result = args[0]; |
+ v8::Local<v8::Object> resolver = args.Holder(); |
+ ASSERT(!resolver.IsEmpty()); |
+ v8SetReturnValue(args, v8::Undefined()); |
+ V8PromiseCustom::fulfillResolver(resolver, result, V8PromiseCustom::Asynchronous, isolate); |
+} |
+ |
+void V8PromiseResolver::resolveMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ v8::Isolate* isolate = args.GetIsolate(); |
+ v8::Local<v8::Value> result = v8::Undefined(); |
+ if (args.Length() > 0 && !args[0].IsEmpty()) |
+ result = args[0]; |
+ v8::Local<v8::Object> resolver = args.Holder(); |
+ ASSERT(!resolver.IsEmpty()); |
+ v8SetReturnValue(args, v8::Undefined()); |
+ V8PromiseCustom::resolveResolver(resolver, result, V8PromiseCustom::Asynchronous, isolate); |
+} |
+ |
+void V8PromiseResolver::rejectMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
+{ |
+ v8::Isolate* isolate = args.GetIsolate(); |
+ v8::Local<v8::Value> result = v8::Undefined(); |
+ if (args.Length() > 0 && !args[0].IsEmpty()) |
+ result = args[0]; |
+ v8::Local<v8::Object> resolver = args.Holder(); |
+ ASSERT(!resolver.IsEmpty()); |
+ v8SetReturnValue(args, v8::Undefined()); |
+ V8PromiseCustom::rejectResolver(resolver, result, V8PromiseCustom::Asynchronous, isolate); |
+} |
+ |
} // namespace WebCore |