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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp

Issue 2855443002: Fix detached event listener attribute updating. (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/WebKit/LayoutTests/fast/events/event-listener-detached.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
index f37c4371737d9f5b7e06eff8289acb743fc36895..3354ab4efb88707c25e5d7e0994ff1241925236b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
@@ -204,7 +204,8 @@ bool V8AbstractEventListener::BelongsToTheCurrentWorld(
return true;
// If currently parsing, the parser could be accessing this listener
// outside of any v8 context; check if it belongs to the main world.
- if (!GetIsolate()->InContext() && execution_context->IsDocument()) {
+ if (!GetIsolate()->InContext() && execution_context &&
+ execution_context->IsDocument()) {
Document* document = ToDocument(execution_context);
if (document->Parser() && document->Parser()->IsParsing())
return World().IsMainWorld();
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/events/event-listener-detached.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698