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

Unified Diff: Source/bindings/v8/custom/V8DocumentCustom.cpp

Issue 305723002: Use method registration approach for creating events on core and modules. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebaseline Created 6 years, 7 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
« no previous file with comments | « no previous file | Source/core/Init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8DocumentCustom.cpp
diff --git a/Source/bindings/v8/custom/V8DocumentCustom.cpp b/Source/bindings/v8/custom/V8DocumentCustom.cpp
index 4248ff3b33ed9c5e1129041665b24f9e6e1dd35e..f88483279132c0223f851d1cfb4071f7071b8dcd 100644
--- a/Source/bindings/v8/custom/V8DocumentCustom.cpp
+++ b/Source/bindings/v8/custom/V8DocumentCustom.cpp
@@ -33,7 +33,6 @@
#include "bindings/core/v8/V8CanvasRenderingContext2D.h"
#include "bindings/core/v8/V8DOMImplementation.h"
-#include "bindings/core/v8/V8Event.h"
#include "bindings/core/v8/V8Node.h"
#include "bindings/core/v8/V8Touch.h"
#include "bindings/core/v8/V8TouchList.h"
@@ -55,7 +54,6 @@
#include "core/xml/DocumentXPathEvaluator.h"
#include "core/xml/XPathNSResolver.h"
#include "core/xml/XPathResult.h"
-#include "modules/InitModules.h"
#include "wtf/RefPtr.h"
namespace WebCore {
@@ -85,26 +83,4 @@ void V8Document::evaluateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>&
v8SetReturnValueFast(info, result.release(), document.get());
}
-// Customize createEvent so it can call createEventModules in modules.
-// FIXME: Use method registration approach instead. http://crbug.com/358074
-void V8Document::createEventMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
-{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "createEvent", "Document", info.Holder(), info.GetIsolate());
- if (UNLIKELY(info.Length() < 1)) {
- throwMinimumArityTypeError(exceptionState, 1, info.Length());
- return;
- }
- Document* impl = V8Document::toNative(info.Holder());
- V8StringResource<> eventType;
- {
- TOSTRING_VOID_INTERNAL(eventType, info[0]);
- }
- RefPtrWillBeRawPtr<Event> result = createEventModules(eventType, exceptionState);
- if (exceptionState.hadException()) {
- exceptionState.throwIfNeeded();
- return;
- }
- v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl);
-}
-
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/Init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698