Skip to content

Commit fe2ea75

Browse files
szuendlegendecas
andauthored
Fix usage of UNLIKELY
Co-authored-by: Chengzhong Wu <[email protected]>
1 parent 83160c8 commit fe2ea75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util-inl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ v8::MaybeLocal<v8::Value> ToV8Value(v8::Local<v8::Context> context,
347347
v8_inspector::StringView str,
348348
v8::Isolate* isolate) {
349349
if (isolate == nullptr) isolate = context->GetIsolate();
350-
if (UNLIKELY(str.length() >= static_cast<size_t>(v8::String::kMaxLength))) {
350+
if (str.length() >= static_cast<size_t>(v8::String::kMaxLength))
351+
[[unlikely]] {
351352
// V8 only has a TODO comment about adding an exception when the maximum
352353
// string size is exceeded.
353354
ThrowErrStringTooLong(isolate);

0 commit comments

Comments
 (0)