Index: Source/core/css/MediaQueryListListener.cpp |
diff --git a/Source/core/css/MediaQueryListListener.cpp b/Source/core/css/MediaQueryListListener.cpp |
index 494883e7ed8d262024155d64bf7e25d5d867b315..8467e76890281534a9b769ba53da487158887258 100644 |
--- a/Source/core/css/MediaQueryListListener.cpp |
+++ b/Source/core/css/MediaQueryListListener.cpp |
@@ -25,8 +25,11 @@ |
namespace WebCore { |
-void MediaQueryListListener::queryChanged(ScriptState* state, MediaQueryList* query) |
+void MediaQueryListListener::call(ScriptState* state) |
{ |
+ if (!m_query) |
+ return; |
+ |
ScriptCallback callback(state, m_value); |
v8::HandleScope handleScope(state->isolate()); |
@@ -35,7 +38,7 @@ void MediaQueryListListener::queryChanged(ScriptState* state, MediaQueryList* qu |
return; // JS may not be enabled. |
v8::Context::Scope scope(context); |
- callback.appendArgument(ScriptValue(toV8(query, v8::Handle<v8::Object>(), context->GetIsolate()), context->GetIsolate())); |
+ callback.appendArgument(ScriptValue(toV8(m_query.get(), v8::Handle<v8::Object>(), context->GetIsolate()), context->GetIsolate())); |
callback.call(); |
} |