chore: bump chromium to 7dff37844cb3 (master) (#18059)

This commit is contained in:
Electron Bot 2019-04-30 20:18:22 -04:00 committed by Jeremy Apthorp
parent 00358545a9
commit 2616911f7a
77 changed files with 1636 additions and 294 deletions

View file

@ -108,8 +108,13 @@ class EventEmitter : public Wrappable<T> {
v8::HandleScope handle_scope(isolate());
EmitEvent(isolate(), GetWrapper(), name, event,
std::forward<Args>(args)...);
return event->Get(StringToV8(isolate(), "defaultPrevented"))
->BooleanValue(isolate());
auto context = isolate()->GetCurrentContext();
v8::Local<v8::Value> defaultPrevented;
if (event->Get(context, StringToV8(isolate(), "defaultPrevented"))
.ToLocal(&defaultPrevented)) {
return defaultPrevented->BooleanValue(isolate());
}
return false;
}
DISALLOW_COPY_AND_ASSIGN(EventEmitter);