Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index dcea02c1d3d3101c16c9cbc89169f3bb088f098b..692e7f1abe14fd61c3cb9eb43c759609997dd5b2 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1097,12 +1097,7 @@ bool Object::ToUint32(uint32_t* value) { |
} |
if (IsHeapNumber()) { |
double num = HeapNumber::cast(this)->value(); |
- if (num < 0) return false; |
- uint32_t uint_value = FastD2UI(num); |
- if (FastUI2D(uint_value) == num) { |
- *value = uint_value; |
- return true; |
- } |
+ return DoubleToUint32IfEqualToSelf(num, value); |
} |
return false; |
} |