[Qt] Fix a crash when the QQuickWebPage is destroyed between the scene graph sync...
authorjocelyn.turcotte <jocelyn.turcotte@digia.com>
Thu, 3 Jan 2013 18:17:21 +0000 (18:17 +0000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 16 Jan 2013 17:00:05 +0000 (18:00 +0100)
commit0ab6ee16c3bb723fe6827864b5b645d5a6f1babe
tree34fb4e92ce60100cc1b866dc6557dbf8d59e1a77
parentc2c595293e376b2609d8176e86b6f2ad86b45223
[Qt] Fix a crash when the QQuickWebPage is destroyed between the scene graph sync and render.
https://bugs.webkit.org/show_bug.cgi?id=106018

Reviewed by Simon Hausmann.

The main and rendering threads are only guaranteed to be synchronised in
the updatePaintNode call. In every other cases, QQuickItems cannot be
safely accessed from the rendering thread.

Do as the first patch version in
https://bugs.webkit.org/show_bug.cgi?id=104574 was doing and copy the
ratio value directly to fix the issue.

Also add a note about the threading issue in QQuickWebPage::updatePaintNode.

* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/qt/QtWebPageSGNode.cpp:
(WebKit::QtWebPageSGNode::QtWebPageSGNode):
* UIProcess/qt/QtWebPageSGNode.h:
(QtWebPageSGNode):
(WebKit::QtWebPageSGNode::devicePixelRatio):
(WebKit::QtWebPageSGNode::setDevicePixelRatio):

Change-Id: Ie849f0f23ae9e017fcdce6326fb2126f3ad66248
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
Source/WebKit2/UIProcess/qt/QtWebPageSGNode.h