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

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

Issue 538933002: ScriptState::contextIsEmpty shouldn't return true for a context whose global object is detached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
Index: Source/bindings/core/v8/V8AbstractEventListener.cpp
diff --git a/Source/bindings/core/v8/V8AbstractEventListener.cpp b/Source/bindings/core/v8/V8AbstractEventListener.cpp
index 6e8487ee27cbc3cfbfe70442c5cb9c58ce8e8060..21be4e1c79935cc44ad2dfae3978b61b6b15a619 100644
--- a/Source/bindings/core/v8/V8AbstractEventListener.cpp
+++ b/Source/bindings/core/v8/V8AbstractEventListener.cpp
@@ -75,7 +75,7 @@ V8AbstractEventListener::~V8AbstractEventListener()
void V8AbstractEventListener::handleEvent(ExecutionContext*, Event* event)
{
- if (scriptState()->contextIsEmpty())
+ if (scriptState()->contextIsValid())
return;
if (!scriptState()->executionContext())
return;
@@ -110,7 +110,7 @@ void V8AbstractEventListener::invokeEventHandler(Event* event, v8::Local<v8::Val
if (jsEvent.IsEmpty())
return;
- ASSERT(!scriptState()->contextIsEmpty());
+ ASSERT(!scriptState()->contextIsValid());
v8::Local<v8::Value> returnValue;
{
// Catch exceptions thrown in the event handler so they do not propagate to javascript code that caused the event to fire.
« no previous file with comments | « Source/bindings/core/v8/ScriptValue.cpp ('k') | Source/bindings/core/v8/V8CustomElementLifecycleCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698