2011-05-18 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
authorCaio Marcelo de Oliveira Filho <cmarcelo@webkit.org>
Wed, 18 May 2011 14:12:56 +0000 (14:12 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 19 May 2011 20:09:03 +0000 (17:09 -0300)
commitcace979a8c301b95d9ecd1c6a0eced1feb7fd516
treefc1adb56824de90a36180948ca47c82ddb04fbd2
parentb2ce0d3d13a8dd34b06fda9112f564b437a20fcc
2011-05-18  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>

        Reviewed by Andreas Kling.

        [Qt] Fix tst_QWebFrame::getSetStaticProperty() autotest
        https://bugs.webkit.org/show_bug.cgi?id=60984

        The code for converting objects to QVariantMap was causing exception,
        that was "leaking" to the next evaluation. One situation was reading
        the property 'localStorage' when we do not have a proper security
        origin, which throws a SECURITY_ERR.

        Now, we will simply not include on the QVariantMap those properties,
        and make sure that we clean the exception if necessary.

        * bridge/qt/qt_runtime.cpp:
        (JSC::Bindings::convertValueToQVariantMap):
        Extracted function that performs conversion from JSObject to a QVariantMap. This
        functions makes sure that exception is clean after its execution.

        (JSC::Bindings::convertValueToQVariant):
        Use the previous function. Add a comment explaining the choice of distance value.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bridge/qt/qt_runtime.cpp