Skip to content

Commit 615f0de

Browse files
committed
exception check pass. this is in WebCore bindings (JSDOMConvertNumbers.cpp), do they not test WebCore with exception checker?
1 parent 5113308 commit 615f0de

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/bun.js/bindings/webcore/JSDOMConvertNumbers.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ static inline T toSmallerInt(JSGlobalObject& lexicalGlobalObject, JSValue value)
131131
case IntegerConversionConfiguration::Normal:
132132
break;
133133
case IntegerConversionConfiguration::EnforceRange:
134-
return enforceRange(lexicalGlobalObject, x, LimitsTrait::minValue, LimitsTrait::maxValue);
134+
RELEASE_AND_RETURN(scope, enforceRange(lexicalGlobalObject, x, LimitsTrait::minValue, LimitsTrait::maxValue));
135135
case IntegerConversionConfiguration::Clamp:
136136
return std::isnan(x) ? 0 : clampTo<T>(x);
137137
}
@@ -177,7 +177,7 @@ static inline T toSmallerUInt(JSGlobalObject& lexicalGlobalObject, JSValue value
177177
case IntegerConversionConfiguration::Normal:
178178
break;
179179
case IntegerConversionConfiguration::EnforceRange:
180-
return enforceRange(lexicalGlobalObject, x, 0, LimitsTrait::maxValue);
180+
RELEASE_AND_RETURN(scope, enforceRange(lexicalGlobalObject, x, 0, LimitsTrait::maxValue));
181181
case IntegerConversionConfiguration::Clamp:
182182
return std::isnan(x) ? 0 : clampTo<T>(x);
183183
}
@@ -262,7 +262,7 @@ template<> int32_t convertToIntegerEnforceRange<int32_t>(JSC::JSGlobalObject& le
262262

263263
double x = value.toNumber(&lexicalGlobalObject);
264264
RETURN_IF_EXCEPTION(scope, 0);
265-
return enforceRange(lexicalGlobalObject, x, kMinInt32, kMaxInt32);
265+
RELEASE_AND_RETURN(scope, enforceRange(lexicalGlobalObject, x, kMinInt32, kMaxInt32));
266266
}
267267

268268
template<> uint32_t convertToIntegerEnforceRange<uint32_t>(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value)
@@ -275,7 +275,7 @@ template<> uint32_t convertToIntegerEnforceRange<uint32_t>(JSC::JSGlobalObject&
275275

276276
double x = value.toNumber(&lexicalGlobalObject);
277277
RETURN_IF_EXCEPTION(scope, 0);
278-
return enforceRange(lexicalGlobalObject, x, 0, kMaxUInt32);
278+
RELEASE_AND_RETURN(scope, enforceRange(lexicalGlobalObject, x, 0, kMaxUInt32));
279279
}
280280

281281
template<> int32_t convertToIntegerClamp<int32_t>(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value)
@@ -316,7 +316,7 @@ template<> int64_t convertToIntegerEnforceRange<int64_t>(JSC::JSGlobalObject& le
316316

317317
double x = value.toNumber(&lexicalGlobalObject);
318318
RETURN_IF_EXCEPTION(scope, 0);
319-
return enforceRange(lexicalGlobalObject, x, -kJSMaxInteger, kJSMaxInteger);
319+
RELEASE_AND_RETURN(scope, enforceRange(lexicalGlobalObject, x, -kJSMaxInteger, kJSMaxInteger));
320320
}
321321

322322
template<> uint64_t convertToIntegerEnforceRange<uint64_t>(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value)
@@ -329,7 +329,7 @@ template<> uint64_t convertToIntegerEnforceRange<uint64_t>(JSC::JSGlobalObject&
329329

330330
double x = value.toNumber(&lexicalGlobalObject);
331331
RETURN_IF_EXCEPTION(scope, 0);
332-
return enforceRange(lexicalGlobalObject, x, 0, kJSMaxInteger);
332+
RELEASE_AND_RETURN(scope, enforceRange(lexicalGlobalObject, x, 0, kJSMaxInteger));
333333
}
334334

335335
template<> int64_t convertToIntegerClamp<int64_t>(JSC::JSGlobalObject& lexicalGlobalObject, JSC::JSValue value)

0 commit comments

Comments
 (0)