Conversation
|
I like the idea. But why not use P.S. I think what I like about DCHECK(Object.Set(value)) |
|
@refack Isn't that more like an idea for refactoring |
|
As for stability IIUC they are implemented as close to the new standard as possible (they can even be used by static analysers like clang-tidy) But yeah, it's just something to consider... I like the PR anyway. |
|
I know the PR title isn’t very descript, but I think this has a lot of overlap with #24359 ? |
|
@addaleax Ah yes, sorry I didn't notice about the ping earlier. I will close this one out. |
The first commit adds DCHECK macros that are only enabled in debug build and are noops in release buidls.
The second commit refactors
StreamBase::CallJSOnreadMethodto use DCHECK instead of aifdef DEBUGswitch.Reasoning: IMO it's slightly more readable to use
DCHECKand 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
make -j4 test(UNIX), orvcbuild test(Windows) passes(https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)