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

Unified Diff: Source/bindings/core/v8/custom/V8EventTargetCustom.cpp

Issue 551003002: bindings: Removes unnecessary Event-related code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pushed V8EventTargetCustom.cpp back with modification. Created 6 years, 3 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: Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp b/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
index 67d8e1cf1fcd9fc9e4a2000a5580e47d36b8be5e..e360061a0b6376c0d59473aca8f1317708872254 100644
--- a/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
@@ -31,29 +31,23 @@
#include "config.h"
#include "bindings/core/v8/V8EventTarget.h"
-#include "bindings/core/v8/ModuleProxy.h"
-#include "core/EventTargetHeaders.h"
-#include "core/EventTargetInterfaces.h"
+#include "bindings/core/v8/V8Window.h"
+#include "core/EventTargetNames.h"
namespace blink {
-#define TRY_TO_WRAP_WITH_INTERFACE(interfaceName) \
- if (EventTargetNames::interfaceName == desiredInterface) \
- return toV8(static_cast<interfaceName*>(impl), creationContext, isolate);
-
v8::Handle<v8::Value> toV8(EventTarget* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
- if (!impl)
+ if (UNLIKELY(!impl))
return v8::Null(isolate);
- AtomicString desiredInterface = impl->interfaceName();
- EVENT_TARGET_INTERFACES_FOR_EACH(TRY_TO_WRAP_WITH_INTERFACE)
+ if (impl->interfaceName() == EventTargetNames::LocalDOMWindow)
+ return toV8(static_cast<LocalDOMWindow*>(impl), creationContext, isolate);
- v8::Handle<v8::Value> wrapper = ModuleProxy::moduleProxy().toV8ForEventTarget(impl, creationContext, isolate);
- ASSERT(!wrapper.IsEmpty());
- return wrapper;
+ v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperNonTemplate(impl, isolate);
+ if (!wrapper.IsEmpty())
+ return wrapper;
+ return impl->wrap(creationContext, isolate);
}
-#undef TRY_TO_WRAP_WITH_INTERFACE
-
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/V8ObjectConstructor.cpp ('k') | Source/bindings/core/v8/custom/V8TextTrackCueCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698