CLOSED FIXED Bug 38316
[Qt] REGRESSION(r57638): tst_qwebframe::objectDeleted() fails
https://bugs.webkit.org/show_bug.cgi?id=38316
Summary [Qt] REGRESSION(r57638): tst_qwebframe::objectDeleted() fails
Simon Hausmann
Reported 2010-04-29 03:11:49 PDT
After r57638 the objectDeleted() test fails: FAIL! : tst_QWebFrame::objectDeleted() Compared values are not the same Actual (type): undefined Expected (sError): error Loc: [/home/shausman/src/webkit/trunk/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp(2056)] The test creates a QObject, accesses its properties, deletes it and tries to access it again. Accessing the properties of a deleted object should give an exception, just like in QtScript. The following hunk from r57638 caused a slight change in behaviour, triggering the regression: @@ -171,6 +171,8 @@ QtInstance* QtInstance::getInstance(JSObject* object) Class* QtInstance::getClass() const { + if (!m_object) + return 0; if (!m_class) m_class = QtClass::classForObject(m_object); return m_class; After that change even if m_class existed, null is returned. QtClass itself is protected to handle null objects, so a safe solution would be to return null only if we have never created the class wrapper in the first place.
Attachments
Patch (1.54 KB, patch)
2010-04-29 03:14 PDT, Simon Hausmann
vestbo: review+
Simon Hausmann
Comment 1 2010-04-29 03:14:15 PDT
Simon Hausmann
Comment 2 2010-04-29 03:20:58 PDT
Simon Hausmann
Comment 3 2010-04-29 03:21:38 PDT
Revision r58493 cherry-picked into qtwebkit-2.0 with commit 1a40220a82197023c1b1ac6eff027be6dd3168d3
Note You need to log in before you can comment on or make changes to this bug.