Commit 2708c5a6 authored by piotaixr@chromium.org's avatar piotaixr@chromium.org

Added an assertion verifying that a Canvas2DLayerBridge is not deleted

when still in the Canvas2DLayerManager list.

In order to be able to call Canvas2DLayerManager::isInList,
the method has been changed from private to public.

BUG=385141

Review URL: https://codereview.chromium.org/340093003

git-svn-id: svn://svn.chromium.org/blink/trunk@176442 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 0110067c
......@@ -116,6 +116,7 @@ Canvas2DLayerBridge::Canvas2DLayerBridge(PassOwnPtr<blink::WebGraphicsContext3DP
Canvas2DLayerBridge::~Canvas2DLayerBridge()
{
ASSERT(m_destructionInProgress);
ASSERT(!Canvas2DLayerManager::get().isInList(this));
m_layer.clear();
freeReleasedMailbox();
#if ASSERT_ENABLED
......
......@@ -42,12 +42,12 @@ public:
void layerTransientResourceAllocationChanged(Canvas2DLayerBridge*, intptr_t deltaBytes = 0);
void layerDidDraw(Canvas2DLayerBridge*);
bool isInList(Canvas2DLayerBridge*) const;
private:
Canvas2DLayerManager();
// internal methods
void freeMemoryIfNecessary();
bool isInList(Canvas2DLayerBridge*) const;
void addLayerToList(Canvas2DLayerBridge*);
void removeLayerFromList(Canvas2DLayerBridge*);
virtual void willProcessTask() OVERRIDE;
......
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