Chromium Code Reviews| 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 e49d1da5be0a0a93614eb3d6f4b59a7f1e64c423..97ae719532d8f7bc7cb8bebaaf27e4314e765f60 100644 |
| --- a/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp |
| +++ b/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp |
| @@ -32,15 +32,32 @@ |
| #include "bindings/core/v8/V8EventTarget.h" |
| #include "bindings/core/v8/V8Window.h" |
| +#include "core/frame/UseCounter.h" |
| namespace blink { |
| +void V8EventTarget::addEventListenerMethodPrologueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, EventTarget*) |
| +{ |
| + if (info.Length() < 2) { |
| + UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), |
| + info.Length() == 0 ? UseCounter::AddEventListenerNoArguments : UseCounter::AddEventListenerOneArgument); |
|
haraken
2015/07/10 09:32:20
You decided not to throw error and just want to ta
philipj_slow
2015/07/10 09:41:27
Yes, the purpose of this is to actually collect th
|
| + } |
| +} |
| + |
| void V8EventTarget::addEventListenerMethodEpilogueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, EventTarget* impl) |
| { |
| if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode()) |
| addHiddenValueToArray(info.GetIsolate(), info.Holder(), info[1], V8EventTarget::eventListenerCacheIndex); |
| } |
| +void V8EventTarget::removeEventListenerMethodPrologueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, EventTarget*) |
| +{ |
| + if (info.Length() < 2) { |
| + UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), |
| + info.Length() == 0 ? UseCounter::RemoveEventListenerNoArguments : UseCounter::RemoveEventListenerOneArgument); |
| + } |
| +} |
| + |
| void V8EventTarget::removeEventListenerMethodEpilogueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, EventTarget* impl) |
| { |
| if (info.Length() >= 2 && info[1]->IsObject() && !impl->toNode()) |