Changeset 146082 in webkit


Ignore:
Timestamp:
Mar 18, 2013 10:34:37 AM (11 years ago)
Author:
Simon Fraser
Message:

[Mac] Some tests intermittently asserts in SharedBuffer::releasePurgeableBuffer()
https://bugs.webkit.org/show_bug.cgi?id=105986

Source/WebCore:

Reviewed by Brady Eidson.

A ResourceBuffer's SharedBuffer can be vended out to other clients,
for example Images, so there's no guarantee that when the
ResourceBuffer only has one ref its SharedBuffer will also have just one.
When this assumption was broken, SharedBuffer::releasePurgeableBuffer()
would assert.

Ideally SharedBuffer would be entirely encapsulated by ResourceBuffer to
avoid this problem, but ResourceBuffer can't be used by code in platform/.

Fix by having ResourceBuffer::createPurgeableBuffer() refuse to make
a purgeable buffer if the sharedBuffer has more than one ref.

Tested by existing tests.

  • loader/ResourceBuffer.cpp:

(WebCore::ResourceBuffer::createPurgeableBuffer):

LayoutTests:

Reviewed by Brady Eidson.

Remove expected Crashes for tests which should be fixed by this change.

  • platform/mac/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r146080 r146082  
     12013-03-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [Mac] Some tests intermittently asserts in SharedBuffer::releasePurgeableBuffer()
     4        https://bugs.webkit.org/show_bug.cgi?id=105986
     5
     6        Reviewed by Brady Eidson.
     7       
     8        Remove expected Crashes for tests which should be fixed by this change.
     9
     10        * platform/mac/TestExpectations:
     11
    1122013-03-18  Kenneth Russell  <kbr@google.com>
    213
  • trunk/LayoutTests/platform/mac/TestExpectations

    r146034 r146082  
    13751375webkit.org/b/105777 platform/mac/editing/spelling/autocorrection-in-textarea.html [ Failure Pass ]
    13761376
    1377 webkit.org/b/105986 [ Debug ] transitions/hang-with-bad-transition-list.html [ Pass Crash ]
    1378 webkit.org/b/105986 [ Debug ] svg/dynamic-updates/SVGFEMorphologyElement-dom-in-attr.html [ Pass Crash ]
    1379 webkit.org/b/105986 [ Debug ] svg/dynamic-updates/SVGFEMorphologyElement-dom-radius-attr.html [ Pass Crash ]
    1380 webkit.org/b/105986 [ Debug ] svg/dynamic-updates/SVGFEMorphologyElement-dom-operator-attr.html [ Pass Crash ]
    1381 webkit.org/b/105986 [ Debug ] svg/dynamic-updates/SVGFEMergeNodeElement-dom-in-attr.html [ Pass Crash ]
    1382 webkit.org/b/105986 [ Debug ] transitions/interrupt-transform-transition.html [ Pass Crash ]
    1383 webkit.org/b/105986 [ Debug ] transitions/inherit-other-props.html [ Pass Crash ]
    1384 webkit.org/b/105986 [ Debug ] fast/backgrounds/size/parsing-background-size-values.html [ Pass Crash ]
    1385 webkit.org/b/105986 [ Debug ] transitions/flex-transitions.html [ Pass Crash ]
    1386 webkit.org/b/105986 [ Debug ] transitions/interrupt-transform-transition.html [ Pass Crash ]
    1387 
    13881377webkit.org/b/105999 [ Lion ] fast/canvas/canvas-composite-canvas.html [ Failure ]
    13891378webkit.org/b/105999 [ Lion ] fast/canvas/canvas-composite-image.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r146079 r146082  
     12013-03-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        [Mac] Some tests intermittently asserts in SharedBuffer::releasePurgeableBuffer()
     4        https://bugs.webkit.org/show_bug.cgi?id=105986
     5
     6        Reviewed by Brady Eidson.
     7       
     8        A ResourceBuffer's SharedBuffer can be vended out to other clients,
     9        for example Images, so there's no guarantee that when the
     10        ResourceBuffer only has one ref its SharedBuffer will also have just one.
     11        When this assumption was broken, SharedBuffer::releasePurgeableBuffer()
     12        would assert.
     13       
     14        Ideally SharedBuffer would be entirely encapsulated by ResourceBuffer to
     15        avoid this problem, but ResourceBuffer can't be used by code in platform/.
     16       
     17        Fix by having ResourceBuffer::createPurgeableBuffer() refuse to make
     18        a purgeable buffer if the sharedBuffer has more than one ref.
     19
     20        Tested by existing tests.
     21
     22        * loader/ResourceBuffer.cpp:
     23        (WebCore::ResourceBuffer::createPurgeableBuffer):
     24
    1252013-03-18  Ilya Tikhonovsky  <loislo@chromium.org>
    226
  • trunk/Source/WebCore/loader/ResourceBuffer.cpp

    r145820 r146082  
    117117{
    118118    ASSERT(m_sharedBuffer);
     119    if (!sharedBuffer()->hasOneRef())
     120        return;
    119121    sharedBuffer()->createPurgeableBuffer();
    120122}
Note: See TracChangeset for help on using the changeset viewer.