Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (99928 => 99929)
--- trunk/Source/_javascript_Core/ChangeLog 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-11-11 07:08:46 UTC (rev 99929)
@@ -1,3 +1,21 @@
+2011-11-10 Dan Bernstein <[email protected]>
+
+ 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 <[email protected]>
JSString forgets to clear m_fibers when resolving ropes
Modified: trunk/Source/_javascript_Core/dfg/DFGNode.h (99928 => 99929)
--- trunk/Source/_javascript_Core/dfg/DFGNode.h 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/_javascript_Core/dfg/DFGNode.h 2011-11-11 07:08:46 UTC (rev 99929)
@@ -469,7 +469,7 @@
return variableAccessData()->local();
}
-#if !ASSERT_DISABLED
+#ifndef NDEBUG
bool hasIdentifier()
{
switch (op) {
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (99928 => 99929)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2011-11-11 07:08:46 UTC (rev 99929)
@@ -84,7 +84,7 @@
{
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
@@ -97,7 +97,7 @@
if (thisObject->m_inheritorID)
visitor.append(&thisObject->m_inheritorID);
-#ifndef NDEBUG
+#if !ASSERT_DISABLED
visitor.m_isCheckingForDefaultMarkViolation = wasCheckingForDefaultMarkViolation;
#endif
}
Modified: trunk/Source/_javascript_Core/wtf/Deque.h (99928 => 99929)
--- trunk/Source/_javascript_Core/wtf/Deque.h 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/_javascript_Core/wtf/Deque.h 2011-11-11 07:08:46 UTC (rev 99929)
@@ -280,7 +280,7 @@
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);
Modified: trunk/Source/_javascript_Core/wtf/ThreadRestrictionVerifier.h (99928 => 99929)
--- trunk/Source/_javascript_Core/wtf/ThreadRestrictionVerifier.h 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/_javascript_Core/wtf/ThreadRestrictionVerifier.h 2011-11-11 07:08:46 UTC (rev 99929)
@@ -94,7 +94,9 @@
// 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)
Modified: trunk/Source/WebCore/ChangeLog (99928 => 99929)
--- trunk/Source/WebCore/ChangeLog 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/ChangeLog 2011-11-11 07:08:46 UTC (rev 99929)
@@ -1,3 +1,26 @@
+2011-11-10 Dan Bernstein <[email protected]>
+
+ 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 <[email protected]>
[chromium] Add plumbing for JS to write to clipboard in copy/cut events.
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (99928 => 99929)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2011-11-11 07:08:46 UTC (rev 99929)
@@ -157,7 +157,7 @@
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);
Modified: trunk/Source/WebCore/platform/graphics/gpu/TilingData.h (99928 => 99929)
--- trunk/Source/WebCore/platform/graphics/gpu/TilingData.h 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/platform/graphics/gpu/TilingData.h 2011-11-11 07:08:46 UTC (rev 99929)
@@ -77,11 +77,7 @@
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;
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (99928 => 99929)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2011-11-11 07:08:46 UTC (rev 99929)
@@ -55,7 +55,7 @@
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();
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp (99928 => 99929)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp 2011-11-11 07:08:46 UTC (rev 99929)
@@ -96,11 +96,7 @@
{
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);
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp (99928 => 99929)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp 2011-11-11 07:08:46 UTC (rev 99929)
@@ -141,11 +141,7 @@
{
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.
@@ -264,11 +260,7 @@
{
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)
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp (99928 => 99929)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp 2011-11-11 06:53:19 UTC (rev 99928)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp 2011-11-11 07:08:46 UTC (rev 99929)
@@ -84,11 +84,7 @@
{
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);