Skip to content
  • Kevin Marshall's avatar
    Allow custom error messages for DCHECK_CALLED_ON_VALID_SEQUENCE() · e6572ee1
    Kevin Marshall authored
    Allow custom error messages for DCHECK_CALLED_ON_VALID_SEQUENCE().
    The release build definition of DCHECK_CALLED_ON_VALID_SEQUENCE macro
    breaks when it is used with custom error messages w/ostream operators,
    as the macro body is empty and therefore yields a malformed statement.
    This CL uses EAT_STREAM_PARAMETERS to correctly blackhole the error message.
    
    (An example of such a error message can be found in weak_ptr.cc, line 20.)
    
    Also modified the sequence checker unit tests to use custom error messages.
    
    
    R=dcheng@chromium.org
    CC=wez@chromium.org
    
    Change-Id: Iead92dbbca06ae8d7499dbae125136a4897dea31
    Reviewed-on: https://chromium-review.googlesource.com/517455
    
    
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#475969}
    e6572ee1