[BlackBerry] Crash when closing web page if selection is active

https://bugs.webkit.org/show_bug.cgi?id=87962

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-05-31
Reviewed by Antonio Gomes.

The embedder may try to remove a layer from the compositor at a stage
where the compositor has been set to 0.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
(BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 684929a3
......@@ -6246,6 +6246,9 @@ void WebPage::addCompositingThreadOverlay(WebOverlay* overlay)
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
if (!d->compositor())
return;
overlay->d->setPage(d);
d->compositor()->addOverlay(overlay->d->layerCompositingThread());
#endif
......@@ -6255,7 +6258,8 @@ void WebPage::removeCompositingThreadOverlay(WebOverlay* overlay)
{
#if USE(ACCELERATED_COMPOSITING)
ASSERT(Platform::userInterfaceThreadMessageClient()->isCurrentThread());
d->compositor()->removeOverlay(overlay->d->layerCompositingThread());
if (d->compositor())
d->compositor()->removeOverlay(overlay->d->layerCompositingThread());
overlay->d->clear();
overlay->d->setPage(0);
#endif
......
2012-05-31 Arvid Nilsson <anilsson@rim.com>
[BlackBerry] Crash when closing web page if selection is active
https://bugs.webkit.org/show_bug.cgi?id=87962
Reviewed by Antonio Gomes.
The embedder may try to remove a layer from the compositor at a stage
where the compositor has been set to 0.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPage::addCompositingThreadOverlay):
(BlackBerry::WebKit::WebPage::removeCompositingThreadOverlay):
2012-05-30 Konrad Piascik <kpiascik@rim.com>
[BlackBerry] Add an Accelerated Compositing layer for Web Inspector DOM highlight.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment