Changeset 66875 in webkit
- Timestamp:
- Sep 7, 2010 4:14:33 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r66869 r66875 1 2010-09-07 Kent Hansen <kent.hansen@nokia.com> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] tst_QWebFrame::connectAndDisconnect() fails on WebKit trunk because __qt_sender__ is never set 6 https://bugs.webkit.org/show_bug.cgi?id=44697 7 8 When the signal handler is a JS function, __qt_sender__ is stuffed into a temporary 9 object that's pushed onto the function's scope before the function is invoked, and 10 popped again afterwards. 11 12 We were pushing this new scope object _after_ calling JSFunction::getCallData(), 13 and relying on JSC::call() to use the fresh scope chain from the function object. 14 However, this is no longer the case; JSC::call() uses the scope chain passed in 15 the CallData argument. Hence, we need to set up the scope before the function's 16 CallData is queried. 17 18 * bridge/qt/qt_runtime.cpp: 19 (JSC::Bindings::QtConnectionObject::execute): 20 1 21 2010-09-07 Kwang Yul Seo <skyul@company100.net> 2 22 -
trunk/WebCore/bridge/qt/qt_runtime.cpp
r65999 r66875 1794 1794 } 1795 1795 } 1796 CallData callData;1797 CallType callType = m_funcObject->getCallData(callData);1798 1796 // Stuff in the __qt_sender property, if we can 1797 ScopeChain oldsc = ScopeChain(NoScopeChain()); 1798 JSFunction* fimp = 0; 1799 1799 if (m_funcObject->inherits(&JSFunction::info)) { 1800 JSFunction*fimp = static_cast<JSFunction*>(m_funcObject.get());1800 fimp = static_cast<JSFunction*>(m_funcObject.get()); 1801 1801 1802 1802 JSObject* qt_sender = QtInstance::getQtInstance(sender(), ro, QScriptEngine::QtOwnership)->createRuntimeObject(exec); … … 1804 1804 PutPropertySlot slot; 1805 1805 wrapper->put(exec, Identifier(exec, "__qt_sender__"), qt_sender, slot); 1806 ScopeChainoldsc = fimp->scope();1806 oldsc = fimp->scope(); 1807 1807 ScopeChain sc = oldsc; 1808 1808 sc.push(wrapper); 1809 1809 fimp->setScope(sc); 1810 1811 call(exec, fimp, callType, callData, m_thisObject, l); 1810 } 1811 1812 CallData callData; 1813 CallType callType = m_funcObject->getCallData(callData); 1814 call(exec, m_funcObject, callType, callData, m_thisObject, l); 1815 1816 if (fimp) 1812 1817 fimp->setScope(oldsc); 1813 } else {1814 call(exec, m_funcObject, callType, callData, m_thisObject, l);1815 }1816 1818 } 1817 1819 }
Note: See TracChangeset
for help on using the changeset viewer.