Index: Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
diff --git a/Source/core/css/CSSFontFaceLoadEvent.cpp b/Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
similarity index 66% |
copy from Source/core/css/CSSFontFaceLoadEvent.cpp |
copy to Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
index 80ca0c9b0a27dd55d75448736ed30f092f0f5385..57442556ef7d269ddf74804fd1537f16d4b8b7be 100644 |
--- a/Source/core/css/CSSFontFaceLoadEvent.cpp |
+++ b/Source/bindings/v8/custom/V8PromiseResolverCustom.cpp |
@@ -29,38 +29,27 @@ |
*/ |
#include "config.h" |
-#include "core/css/CSSFontFaceLoadEvent.h" |
+#include "V8PromiseResolver.h" |
-namespace WebCore { |
- |
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent() |
-{ |
- ScriptWrappable::init(this); |
-} |
+#include "bindings/v8/V8PromiseUtilities.h" |
+#include <v8.h> |
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, PassRefPtr<CSSFontFaceRule> fontface, PassRefPtr<DOMError> error) |
- : Event(type, false, false) |
- , m_fontface(fontface) |
- , m_error(error) |
-{ |
- ScriptWrappable::init(this); |
-} |
+namespace WebCore { |
-CSSFontFaceLoadEvent::CSSFontFaceLoadEvent(const AtomicString& type, const CSSFontFaceLoadEventInit& initializer) |
- : Event(type, initializer) |
- , m_fontface(initializer.fontface) |
- , m_error(initializer.error) |
+void V8PromiseResolver::fulfillMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
{ |
- ScriptWrappable::init(this); |
+ v8SetReturnValue(args, V8PromiseUtilities::callUnwrappedMethod("fulfill", args, V8PromiseUtilities::promiseResolverPrototype(args.GetIsolate()))); |
} |
-CSSFontFaceLoadEvent::~CSSFontFaceLoadEvent() |
+void V8PromiseResolver::resolveMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
{ |
+ v8SetReturnValue(args, V8PromiseUtilities::callUnwrappedMethod("resolve", args, V8PromiseUtilities::promiseResolverPrototype(args.GetIsolate()))); |
} |
-const AtomicString& CSSFontFaceLoadEvent::interfaceName() const |
+void V8PromiseResolver::rejectMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args) |
{ |
- return eventNames().interfaceForCSSFontFaceLoadEvent; |
+ v8SetReturnValue(args, V8PromiseUtilities::callUnwrappedMethod("reject", args, V8PromiseUtilities::promiseResolverPrototype(args.GetIsolate()))); |
} |
} // namespace WebCore |
+ |