-
eric@webkit.org authored
Reviewed by Kenneth Rohde Christiansen. [Qt] Null QObjects properties cause Segmentation Fault https://bugs.webkit.org/show_bug.cgi?id=34730 QObjects exported to the QWebkit javascript with properties that are a null "QObject*" cause Segmentation Fault. If an QObject is added to the javascript context and it contains properties of the type QObject* with NULL value, calling the property causes Segmentation Fault. So now the code below properly checks for null pointers: * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::getClass): may return NULL (JSC::Bindings::QtInstance::getMethod): may return jsNull() (JSC::Bindings::QtInstance::stringValue): may return jsNull() (JSC::Bindings::QtInstance::booleanValue): may return false * bridge/qt/qt_runtime.cpp: (JSC::Bindings::convertValueToQVariant): (JSC::Bindings::convertQVariantToValue): May return jsNull on QObjectStar 2010-04-15 Bruno Schmidt <bruno.schmidt@gmail.com> Reviewed by Kenneth Rohde Christiansen. [Qt] Null QObjects properties cause Segmentation Fault https://bugs.webkit.org/show_bug.cgi?id=34730 QObjects exported to the QWebkit javascript with properties that are a null "QObject*" cause Segmentation Fault. If an QObject is added to the javascript context and it contains properties of the type QObject* with NULL value, calling the property causes Segmentation Fault. Follow the tests for the corrections done over WebCore. * tests/qwebframe/tst_qwebframe.cpp: (MyQObject::MyQObject): init the field m_objectStar (MyQObject::objectStarProperty): read the Object* prop (MyQObject::setObjectStarProperty): write the Object* prop (tst_QWebFrame::getSetStaticProperty): new tests for the new prop git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1c041ea2