Improving safety checks in diagnostics channel#6160
Conversation
|
OK,
Actually, wait — let me re-examine one thing. In the kj::Maybe<double> JsNumber::value(Lock& js) const {
KJ_ASSERT(!inner.IsEmpty());
double value;
if (inner->NumberValue(js.v8Context()).To(&value)) {
return value;
}
return kj::none;
}
Then in KJ_IF_SOME(value, value(js)) {This calls Overall this PR looks solid. The main thing I'd flag is the variable name shadowing for readability, but I need to decide if that's actionable or nitpicky. Let me check: is there a real risk from the shadowing? In for (auto _kj_value = value(js); ...) {
auto& value = _kj_value; // simplified
...
}Actually, I think this PR is clean enough that the issues are not actionable per the review criteria. The shadowing is a style preference (and the codebase uses this pattern already), not a logic bug. The LGTM |
No description provided.