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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2039453003: Fix crash in blocked input event warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index 373a20500bf6cf4070b6e7766a584f735fbbbeaa..21ee9c24b355530483f32b3a0e7c5fa8b4407f75 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -95,6 +95,10 @@ void reportBlockedEvent(ExecutionContext* context, const Event* event, Registere
V8AbstractEventListener* v8Listener = V8AbstractEventListener::cast(registeredListener->listener());
v8::HandleScope handles(v8Listener->isolate());
+ v8::Local<v8::Context> v8Context = toV8Context(context, v8Listener->world());
+ if (v8Context.IsEmpty())
+ return;
+ v8::Context::Scope contextScope(v8Context);
v8::Local<v8::Object> handler = v8Listener->getListenerObject(context);
String messageText = String::format(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698