Bug 33540 - Make it possible to build in debug mode with assertions disabled
Summary: Make it possible to build in debug mode with assertions disabled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 11:19 PST by Alexey Proskuryakov
Modified: 2010-01-12 11:43 PST (History)
0 users

See Also:


Attachments
proposed patch (9.96 KB, patch)
2010-01-12 11:22 PST, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2010-01-12 11:19:46 PST
Useful for debugging 3rd party applications that trigger assertions early - I'd like to have logging work anyway.
Comment 1 Alexey Proskuryakov 2010-01-12 11:22:30 PST
Created attachment 46384 [details]
proposed patch
Comment 2 Darin Adler 2010-01-12 11:27:08 PST
Comment on attachment 46384 [details]
proposed patch

> +    UNUSED_PARAM(exec);
>      ASSERT(exec->globalData().identifierTable == currentIdentifierTable());

How about using ASSERT_UNUSED? We made it for this kind of situation.

> +    UNUSED_PARAM(globalData);
>      ASSERT(globalData->identifierTable == currentIdentifierTable());

Ditto.

> +#include <wtf/UnusedParam.h>
>  
>  namespace WTF {
>  
> @@ -196,6 +197,7 @@ namespace WTF {
>  #if CHECK_HASHTABLE_ITERATORS
>          void checkValidity(const const_iterator& other) const
>          {
> +            UNUSED_PARAM(other);

Here too.

> +#include <wtf/UnusedParam.h>
>  
>  #define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
>  
> @@ -111,6 +112,7 @@ void* RenderArena::allocate(size_t size)
>  void RenderArena::free(size_t size, void* ptr)
>  {
>  #ifndef NDEBUG
> +    UNUSED_PARAM(size);
>      // Use standard free so that memory debugging tools work.
>      RenderArenaDebugHeader* header = static_cast<RenderArenaDebugHeader*>(ptr) - 1;
>      ASSERT(header->signature == signature);

I don't understand this change.

> +        * DumpRenderTree/ForwardingHeaders/wtf/UnusedParam.h: Added.

Maybe we can avoid this.

> Index: LayoutTests/ChangeLog
> ===================================================================
> --- LayoutTests/ChangeLog	(revision 53112)
> +++ LayoutTests/ChangeLog	(working copy)
> @@ -1,3 +1,17 @@
> +2010-01-08  Alexey Proskuryakov  <ap@apple.com>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        https://bugs.webkit.org/show_bug.cgi?id=32294
> +        http/tests/uri/escaped-entity.html affects the output of svg/W3C-SVG-1.1/filters-conv-01-f.svg
> +
> +        Changed the test to not have any funky characters. Filed bug 33400 to track the underlying
> +        problem with kerning.
> +
> +        * http/tests/uri/escaped-entity-expected.txt:
> +        * http/tests/uri/escaped-entity.html:
> +        * platform/mac/Skipped:

Oops.

r=me, but I'd prefer a version that uses UNUSED_PARAM less
Comment 3 Alexey Proskuryakov 2010-01-12 11:43:16 PST
Committed <http://trac.webkit.org/changeset/53151> with suggested changes.