Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed config.gni. Minor cleanups. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 canvas2DLayerBridgeInstanceCounter.increment(); 110 canvas2DLayerBridgeInstanceCounter.increment();
111 #endif 111 #endif
112 } 112 }
113 113
114 Canvas2DLayerBridge::~Canvas2DLayerBridge() 114 Canvas2DLayerBridge::~Canvas2DLayerBridge()
115 { 115 {
116 ASSERT(m_destructionInProgress); 116 ASSERT(m_destructionInProgress);
117 ASSERT(!Canvas2DLayerManager::get().isInList(this)); 117 ASSERT(!Canvas2DLayerManager::get().isInList(this));
118 m_layer.clear(); 118 m_layer.clear();
119 freeReleasedMailbox(); 119 freeReleasedMailbox();
120 #if ASSERT_ENABLED 120 #if ENABLE(ASSERT)
121 Vector<MailboxInfo>::iterator mailboxInfo; 121 Vector<MailboxInfo>::iterator mailboxInfo;
122 for (mailboxInfo = m_mailboxes.begin(); mailboxInfo < m_mailboxes.end(); ++m ailboxInfo) { 122 for (mailboxInfo = m_mailboxes.begin(); mailboxInfo < m_mailboxes.end(); ++m ailboxInfo) {
123 ASSERT(mailboxInfo->m_status != MailboxInUse); 123 ASSERT(mailboxInfo->m_status != MailboxInUse);
124 ASSERT(mailboxInfo->m_status != MailboxReleased || m_contextProvider->co ntext3d()->isContextLost() || !m_isSurfaceValid); 124 ASSERT(mailboxInfo->m_status != MailboxReleased || m_contextProvider->co ntext3d()->isContextLost() || !m_isSurfaceValid);
125 } 125 }
126 #endif 126 #endif
127 m_mailboxes.clear(); 127 m_mailboxes.clear();
128 #ifndef NDEBUG 128 #ifndef NDEBUG
129 canvas2DLayerBridgeInstanceCounter.decrement(); 129 canvas2DLayerBridgeInstanceCounter.decrement();
130 #endif 130 #endif
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) { 544 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) {
545 // This copy constructor should only be used for Vector reallocation 545 // This copy constructor should only be used for Vector reallocation
546 // Assuming 'other' is to be destroyed, we transfer m_image ownership 546 // Assuming 'other' is to be destroyed, we transfer m_image ownership
547 // rather than do a refcount dance. 547 // rather than do a refcount dance.
548 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); 548 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox));
549 m_image = const_cast<MailboxInfo*>(&other)->m_image.release(); 549 m_image = const_cast<MailboxInfo*>(&other)->m_image.release();
550 m_status = other.m_status; 550 m_status = other.m_status;
551 } 551 }
552 552
553 } 553 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698