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

Unified Diff: Source/web/tests/CustomEventTest.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/web/tests/CustomEventTest.cpp
diff --git a/Source/web/tests/CustomEventTest.cpp b/Source/web/tests/CustomEventTest.cpp
index 0958d6510eae073c1e739bba9029e3904207f462..023f23261e279470d38f8c04bfad9f83f0834a32 100644
--- a/Source/web/tests/CustomEventTest.cpp
+++ b/Source/web/tests/CustomEventTest.cpp
@@ -59,12 +59,12 @@ public:
return true;
}
- virtual void handleEvent(ExecutionContext* context, Event* event)
+ virtual void handleEvent(ScriptState* scriptState, Event* event)
{
EXPECT_EQ(event->type(), "blah");
- ScriptState::Scope scope(scriptState());
- v8::Handle<v8::Value> jsEvent = toV8(event, scriptState()->context()->Global(), isolate());
+ ScriptState::Scope scope(scriptState);
+ v8::Handle<v8::Value> jsEvent = toV8(event, scriptState->context()->Global(), isolate());
EXPECT_EQ(jsEvent->ToObject(isolate())->Get(v8::String::NewFromUtf8(isolate(), "detail")), v8::Boolean::New(isolate(), true));
}
@@ -76,11 +76,11 @@ public:
private:
TestListener(ScriptState* scriptState)
- : V8AbstractEventListener(false, scriptState)
+ : V8AbstractEventListener(false, scriptState->world(), scriptState->isolate())
{
}
- 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