Changeset 149208 in webkit


Ignore:
Timestamp:
Apr 26, 2013 2:13:22 PM (11 years ago)
Author:
Simon Fraser
Message:

Inspector window is often blank when opened
https://bugs.webkit.org/show_bug.cgi?id=115220
<rdar://problem/13735496>

Reviewed by Tim Horton.

After disabling tiled scrolling and accelerated drawing in r149006, the
Inspector window was often missing its content after opening. This only
happened when the user has a preference on disk to use accelerated drawing
in the Inspector.

The missing content was caused by a failure to connect the correct contextID
for remote layer hosting. On window creation, we hook up a context using
WindowServer layer hosting (the default), but then switch back to app-hosted
layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
but that can be re-entered via its call to sendUpdateBackingStoreState(). In
that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
with a stale layerTreeContext.

Fix by moving the code that exits/enters accelerated compositing mode to before
the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
use of a possibly stale layerTreeContext.

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r149204 r149208  
     12013-04-26  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Inspector window is often blank when opened
     4        https://bugs.webkit.org/show_bug.cgi?id=115220
     5
     6        Reviewed by Tim Horton.
     7       
     8        After disabling tiled scrolling and accelerated drawing in r149006, the
     9        Inspector window was often missing its content after opening. This only
     10        happened when the user has a preference on disk to use accelerated drawing
     11        in the Inspector.
     12       
     13        The missing content was caused by a failure to connect the correct contextID
     14        for remote layer hosting. On window creation, we hook up a context using
     15        WindowServer layer hosting (the default), but then switch back to app-hosted
     16        layers for the Inspector window. This switching happens in didUpdateBackingStoreState(),
     17        but that can be re-entered via its call to sendUpdateBackingStoreState(). In
     18        that cause, on unwinding the stack it would call enterAcceleratedCompositingMode()
     19        with a stale layerTreeContext.
     20       
     21        Fix by moving the code that exits/enters accelerated compositing mode to before
     22        the call to sendUpdateBackingStoreState() that can cause re-entrancy. That avoids
     23        use of a possibly stale layerTreeContext.
     24
     25        * UIProcess/DrawingAreaProxyImpl.cpp:
     26        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
     27
    1282013-04-26  Alexey Proskuryakov  <ap@apple.com>
    229
  • trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp

    r142160 r149208  
    194194    m_webPageProxy->process()->responsivenessTimer()->stop();
    195195
    196     if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
    197         sendUpdateBackingStoreState(RespondImmediately);
    198     else
    199         m_hasReceivedFirstUpdate = true;
    200 
    201196#if USE(ACCELERATED_COMPOSITING)
    202197    if (layerTreeContext != m_layerTreeContext) {
     
    211206        }           
    212207    }
    213 
     208#endif
     209
     210    if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
     211        sendUpdateBackingStoreState(RespondImmediately);
     212    else
     213        m_hasReceivedFirstUpdate = true;
     214
     215#if USE(ACCELERATED_COMPOSITING)
    214216    if (isInAcceleratedCompositingMode()) {
    215217        ASSERT(!m_backingStore);
Note: See TracChangeset for help on using the changeset viewer.