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

Unified Diff: Source/core/xml/DocumentXSLT.cpp

Issue 823263002: ScriptState used by EventListener::handleEvent() is wrong (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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/core/xml/DocumentXSLT.cpp
diff --git a/Source/core/xml/DocumentXSLT.cpp b/Source/core/xml/DocumentXSLT.cpp
index 08d70269ec25e79d9512917d8a7c419d2a8952df..b00f2482b56010866f2d0ae932102ce810d82d1a 100644
--- a/Source/core/xml/DocumentXSLT.cpp
+++ b/Source/core/xml/DocumentXSLT.cpp
@@ -36,13 +36,13 @@ public:
return true;
}
- virtual void handleEvent(ExecutionContext* context, Event* event)
+ virtual void handleEvent(ScriptState* scriptState, Event* event)
{
ASSERT(RuntimeEnabledFeatures::xsltEnabled());
ASSERT(event->type() == "DOMContentLoaded");
- ScriptState::Scope scope(scriptState());
+ ScriptState::Scope scope(scriptState);
- Document& document = *toDocument(context);
+ Document& document = *toDocument(scriptState->executionContext());
ASSERT(!document.parsing());
// Processing instruction (XML documents only).
@@ -70,7 +70,7 @@ public:
private:
DOMContentLoadedListener(ScriptState* scriptState, ProcessingInstruction* pi)
- : V8AbstractEventListener(false, scriptState)
+ : V8AbstractEventListener(false, scriptState->world(), scriptState->isolate())
, m_processingInstruction(pi)
{
}
@@ -78,7 +78,7 @@ private:
virtual void refDetachableEventListener() override { ref(); }
virtual void derefDetachableEventListener() override { deref(); }
- virtual v8::Local<v8::Value> callListenerFunction(v8::Handle<v8::Value> jsevent, Event*)
+ virtual v8::Local<v8::Value> callListenerFunction(ScriptState*, v8::Handle<v8::Value>, Event*)
{
ASSERT_NOT_REACHED();
return v8::Local<v8::Value>();

Powered by Google App Engine
This is Rietveld 408576698