[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
kent.hansen at nokia.com
kent.hansen at nokia.com
Wed Dec 22 13:06:57 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 8f8acc93fdccd546fe9ceaebd2043c42250c21b6
Author: kent.hansen at nokia.com <kent.hansen at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 7 11:14:33 2010 +0000
2010-09-07 Kent Hansen <kent.hansen at nokia.com>
Reviewed by Andreas Kling.
[Qt] tst_QWebFrame::connectAndDisconnect() fails on WebKit trunk because __qt_sender__ is never set
https://bugs.webkit.org/show_bug.cgi?id=44697
When the signal handler is a JS function, __qt_sender__ is stuffed into a temporary
object that's pushed onto the function's scope before the function is invoked, and
popped again afterwards.
We were pushing this new scope object _after_ calling JSFunction::getCallData(),
and relying on JSC::call() to use the fresh scope chain from the function object.
However, this is no longer the case; JSC::call() uses the scope chain passed in
the CallData argument. Hence, we need to set up the scope before the function's
CallData is queried.
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtConnectionObject::execute):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5459b59..3101120 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-07 Kent Hansen <kent.hansen at nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] tst_QWebFrame::connectAndDisconnect() fails on WebKit trunk because __qt_sender__ is never set
+ https://bugs.webkit.org/show_bug.cgi?id=44697
+
+ When the signal handler is a JS function, __qt_sender__ is stuffed into a temporary
+ object that's pushed onto the function's scope before the function is invoked, and
+ popped again afterwards.
+
+ We were pushing this new scope object _after_ calling JSFunction::getCallData(),
+ and relying on JSC::call() to use the fresh scope chain from the function object.
+ However, this is no longer the case; JSC::call() uses the scope chain passed in
+ the CallData argument. Hence, we need to set up the scope before the function's
+ CallData is queried.
+
+ * bridge/qt/qt_runtime.cpp:
+ (JSC::Bindings::QtConnectionObject::execute):
+
2010-09-07 Kwang Yul Seo <skyul at company100.net>
Reviewed by Kent Tamura.
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index 630fd2f..ce4567a 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -1793,26 +1793,28 @@ void QtConnectionObject::execute(void **argv)
l.append(jsUndefined());
}
}
- CallData callData;
- CallType callType = m_funcObject->getCallData(callData);
// Stuff in the __qt_sender property, if we can
+ ScopeChain oldsc = ScopeChain(NoScopeChain());
+ JSFunction* fimp = 0;
if (m_funcObject->inherits(&JSFunction::info)) {
- JSFunction* fimp = static_cast<JSFunction*>(m_funcObject.get());
+ fimp = static_cast<JSFunction*>(m_funcObject.get());
JSObject* qt_sender = QtInstance::getQtInstance(sender(), ro, QScriptEngine::QtOwnership)->createRuntimeObject(exec);
JSObject* wrapper = new (exec) JSObject(JSObject::createStructure(jsNull()));
PutPropertySlot slot;
wrapper->put(exec, Identifier(exec, "__qt_sender__"), qt_sender, slot);
- ScopeChain oldsc = fimp->scope();
+ oldsc = fimp->scope();
ScopeChain sc = oldsc;
sc.push(wrapper);
fimp->setScope(sc);
+ }
+
+ CallData callData;
+ CallType callType = m_funcObject->getCallData(callData);
+ call(exec, m_funcObject, callType, callData, m_thisObject, l);
- call(exec, fimp, callType, callData, m_thisObject, l);
+ if (fimp)
fimp->setScope(oldsc);
- } else {
- call(exec, m_funcObject, callType, callData, m_thisObject, l);
- }
}
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list