https://bugs.webkit.org/show_bug.cgi?id=72091
Reviewed by Geoff Garen.
Source/JavaScriptCore:
* dfg/DFGNode.h: Made hasIdentifier() available when assertions are
disabled. It is used in Graph::dump().
* runtime/JSObject.cpp:
(JSC::JSObject::visitChildren): Update m_isCheckingForDefaultMarkViolation
only if assertions are enabled.
* wtf/Deque.h:
(WTF::::checkIndexValidity): Changed ASSERT to ASSERT_UNUSED.
* wtf/ThreadRestrictionVerifier.h:
(WTF::ThreadRestrictionVerifier::setShared): Guarded the definition of
a local variable that is only used in an assertion.
Source/WebCore:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::didDecodeProperties): Guarded the definition of local variables that are
only used in an assertion correctly.
* platform/graphics/gpu/TilingData.h: Changed ASSERT to ASSERT_UNUSED.
(WebCore::TilingData::assertTile):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::willBeDestroyed): Guarded the definition of a local variable that is
only used in an assertion correctly.
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyResource): Changed ASSERT to ASSERT_UNUSED.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource): Changed ASSERT to ASSERT_UNUSED.
(WebCore::RenderSVGResourceFilter::postApplyResource): Changed ASSERT to ASSERT_UNUSED.
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource): Changed ASSERT to ASSERT_UNUSED.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99929
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-11-10 Dan Bernstein <mitz@apple.com>
+
+ Disabling assertions breaks the debug build
+ https://bugs.webkit.org/show_bug.cgi?id=72091
+
+ Reviewed by Geoff Garen.
+
+ * dfg/DFGNode.h: Made hasIdentifier() available when assertions are
+ disabled. It is used in Graph::dump().
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::visitChildren): Update m_isCheckingForDefaultMarkViolation
+ only if assertions are enabled.
+ * wtf/Deque.h:
+ (WTF::::checkIndexValidity): Changed ASSERT to ASSERT_UNUSED.
+ * wtf/ThreadRestrictionVerifier.h:
+ (WTF::ThreadRestrictionVerifier::setShared): Guarded the definition of
+ a local variable that is only used in an assertion.
+
2011-11-10 Filip Pizlo <fpizlo@apple.com>
JSString forgets to clear m_fibers when resolving ropes
return variableAccessData()->local();
}
-#if !ASSERT_DISABLED
+#ifndef NDEBUG
bool hasIdentifier()
{
switch (op) {
{
JSObject* thisObject = static_cast<JSObject*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
bool wasCheckingForDefaultMarkViolation = visitor.m_isCheckingForDefaultMarkViolation;
visitor.m_isCheckingForDefaultMarkViolation = false;
#endif
if (thisObject->m_inheritorID)
visitor.append(&thisObject->m_inheritorID);
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
visitor.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation;
#endif
}
template<typename T, size_t inlineCapacity>
void Deque<T, inlineCapacity>::checkIndexValidity(size_t index) const
{
- ASSERT(index <= m_buffer.capacity());
+ ASSERT_UNUSED(index, index <= m_buffer.capacity());
if (m_start <= m_end) {
ASSERT(index >= m_start);
ASSERT(index <= m_end);
// Indicates that the object may (or may not) be owned by more than one place.
void setShared(bool shared)
{
+#if !ASSERT_DISABLED
bool previouslyShared = m_shared;
+#endif
m_shared = shared;
if (!m_shared)
+2011-11-10 Dan Bernstein <mitz@apple.com>
+
+ Disabling assertions breaks the debug build
+ https://bugs.webkit.org/show_bug.cgi?id=72091
+
+ Reviewed by Geoff Garen.
+
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::didDecodeProperties): Guarded the definition of local variables that are
+ only used in an assertion correctly.
+ * platform/graphics/gpu/TilingData.h: Changed ASSERT to ASSERT_UNUSED.
+ (WebCore::TilingData::assertTile):
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::willBeDestroyed): Guarded the definition of a local variable that is
+ only used in an assertion correctly.
+ * rendering/svg/RenderSVGResourceClipper.cpp:
+ (WebCore::RenderSVGResourceClipper::applyResource): Changed ASSERT to ASSERT_UNUSED.
+ * rendering/svg/RenderSVGResourceFilter.cpp:
+ (WebCore::RenderSVGResourceFilter::applyResource): Changed ASSERT to ASSERT_UNUSED.
+ (WebCore::RenderSVGResourceFilter::postApplyResource): Changed ASSERT to ASSERT_UNUSED.
+ * rendering/svg/RenderSVGResourceMasker.cpp:
+ (WebCore::RenderSVGResourceMasker::applyResource): Changed ASSERT to ASSERT_UNUSED.
+
2011-11-10 Daniel Cheng <dcheng@chromium.org>
[chromium] Add plumbing for JS to write to clipboard in copy/cut events.
if (m_decodedPropertiesSize == updatedSize)
return;
int deltaBytes = updatedSize - m_decodedPropertiesSize;
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
bool overflow = updatedSize > m_decodedPropertiesSize && deltaBytes < 0;
bool underflow = updatedSize < m_decodedPropertiesSize && deltaBytes > 0;
ASSERT(!overflow && !underflow);
private:
TilingData() : m_maxTextureSize(0), m_totalSizeX(0), m_totalSizeY(0) {}
-#ifndef NDEBUG
- void assertTile(int tile) const { ASSERT(tile >= 0 && tile < numTiles()); }
-#else
- void assertTile(int) const {}
-#endif
+ void assertTile(int tile) const { ASSERT_UNUSED(tile, tile >= 0 && tile < numTiles()); }
void recomputeNumTiles();
int m_maxTextureSize;
void RenderInline::willBeDestroyed()
{
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
// Make sure we do not retain "this" in the continuation outline table map of our containing blocks.
if (parent() && style()->visibility() == VISIBLE && hasOutline()) {
bool containingBlockPaintsContinuationOutline = continuation() || isInlineElementContinuation();
{
ASSERT(object);
ASSERT(context);
-#ifndef NDEBUG
- ASSERT(resourceMode == ApplyToDefaultMode);
-#else
- UNUSED_PARAM(resourceMode);
-#endif
+ ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode);
return applyClippingToContext(object, object->objectBoundingBox(), object->repaintRectInLocalCoordinates(), context);
}
{
ASSERT(object);
ASSERT(context);
-#ifndef NDEBUG
- ASSERT(resourceMode == ApplyToDefaultMode);
-#else
- UNUSED_PARAM(resourceMode);
-#endif
+ ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode);
// Returning false here, to avoid drawings onto the context. We just want to
// draw the stored filter output, not the unfiltered object as well.
{
ASSERT(object);
ASSERT(context);
-#ifndef NDEBUG
- ASSERT(resourceMode == ApplyToDefaultMode);
-#else
- UNUSED_PARAM(resourceMode);
-#endif
+ ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode);
FilterData* filterData = m_filter.get(object);
if (!filterData)
{
ASSERT(object);
ASSERT(context);
-#ifndef NDEBUG
- ASSERT(resourceMode == ApplyToDefaultMode);
-#else
- UNUSED_PARAM(resourceMode);
-#endif
+ ASSERT_UNUSED(resourceMode, resourceMode == ApplyToDefaultMode);
if (!m_masker.contains(object))
m_masker.set(object, new MaskerData);