Skip to content

src: add DCHECK macros

Rodrigo Muino Tomonari requested to merge github/fork/joyeecheung/dcheck into master

The first commit adds DCHECK macros that are only enabled in debug build and are noops in release buidls.

The second commit refactors StreamBase::CallJSOnreadMethod to use DCHECK instead of a ifdef DEBUG switch.

Reasoning: IMO it's slightly more readable to use DCHECK and it's a utility commonly used in V8 - we can be more generous about adding checks for the debug builds as general assertions to help finding subtle bugs.

Checklist

Merge request reports

Loading