Commit 91164621 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[bindings] Fix cast for GetEventListener

Previously, only V8EventListener were handled in the helper. With
crrev.com/579347 this changed and all types of V8 event listeners use
this mechanism. Their common superclass is V8AbstractEventListener which
is returned here.

Bug: chromium:870351, chromium:843903
Change-Id: I4407cf5abfddf10d644c3fd7e1add86dbfa5d5f9
Reviewed-on: https://chromium-review.googlesource.com/1161907
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: default avatarYuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580505}
parent 51c23e5a
......@@ -60,7 +60,7 @@ ListenerType* GetEventListenerInternal(
} // namespace
// static
V8EventListener* V8EventListenerHelper::GetEventListener(
V8AbstractEventListener* V8EventListenerHelper::GetEventListener(
ScriptState* script_state,
v8::Local<v8::Value> value,
bool is_attribute,
......@@ -77,7 +77,7 @@ V8EventListener* V8EventListenerHelper::GetEventListener(
? V8PrivateProperty::GetV8EventListenerAttributeListener(isolate)
: V8PrivateProperty::GetV8EventListenerListener(isolate);
return GetEventListenerInternal<V8EventListener>(
return GetEventListenerInternal<V8AbstractEventListener>(
script_state, object, listener_property, lookup,
[object, is_attribute, script_state, listener_property]() {
return script_state->World().IsWorkerWorld()
......
......@@ -53,10 +53,11 @@ class V8EventListenerHelper {
STATIC_ONLY(V8EventListenerHelper);
public:
CORE_EXPORT static V8EventListener* GetEventListener(ScriptState*,
v8::Local<v8::Value>,
bool is_attribute,
ListenerLookupType);
CORE_EXPORT static V8AbstractEventListener* GetEventListener(
ScriptState*,
v8::Local<v8::Value>,
bool is_attribute,
ListenerLookupType);
CORE_EXPORT static V8ErrorHandler* EnsureErrorHandler(ScriptState*,
v8::Local<v8::Value>);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment