| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
uint32_t keys_len = keys->ulength().value();q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?
int lines_end_len = static_cast<int>(line_ends->ulength().value());Why not uint32_t here too? And addtl a `DCHECK_GT(lines_end_len, 0)` for the subtractions below.
return values->ulength().value() - 2;DCHECK_GE(.., 2)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
uint32_t keys_len = keys->ulength().value();q: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?
The idea would be to keep `SafeHeapObjectSize` (renamed to something more generic) at least until implicit casts warnings can be enabled on the codebase. This way all callsites have to be more explicit when handling lengths by calling `.value()`. Of course, you could also end up writing `int something = length().value()` but it should hopefully be less likely.
int lines_end_len = static_cast<int>(line_ends->ulength().value());Why not uint32_t here too? And addtl a `DCHECK_GT(lines_end_len, 0)` for the subtractions below.
Done
return values->ulength().value() - 2;Arash KazemiDCHECK_GE(.., 2)
Done
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
uint32_t keys_len = keys->ulength().value();Arash Kazemiq: `SafeHeapObjectSize` is just for porting and ulength will return a plain uint32_t once done?
The idea would be to keep `SafeHeapObjectSize` (renamed to something more generic) at least until implicit casts warnings can be enabled on the codebase. This way all callsites have to be more explicit when handling lengths by calling `.value()`. Of course, you could also end up writing `int something = length().value()` but it should hopefully be less likely.
I see.
Of course, you could also end up writing int something = length().value() but it should hopefully be less likely.
Yeah exactly; I hope we're going in the right direction here wrt preventing mistakes vs. readable/simple code. Personally I'd much rather work with plain uint32_t.
return Just(GetSmiValue(line_ends, lines_end_len - 1));nit: There's one more here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
nit: There's one more here.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[debug] Convert usages of FixedArray::length to ulength
Improve robustness in the sandbox attacker model by using unsigned
integer length for FixedArray (see: crrev.com/c/7544875). Additionally,
BreakPointInfo::GetBreakPointCount and DebugInfo::GetBreakPointCount now
return uint32_t.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
for (uint32_t i = 0; i < names_len; ++i) {`names_len` can be `const`, as well the other places where we read the length into a variable.
I didn't think about this in the previous CLs, so let's leave them as is. No need to go back and update all locations. Let's just add `const` from now on.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
`names_len` can be `const`, as well the other places where we read the length into a variable.
I didn't think about this in the previous CLs, so let's leave them as is. No need to go back and update all locations. Let's just add `const` from now on.
Good point, I have added const in this CL and will try to address the rest in follow-up CLs.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm % highlighted some more places that can be const
uint32_t index = TransitionArray::kProtoTransitionHeaderSize + i;const
uint32_t nof_bound_arguments = function->bound_arguments()->ulength().value();const
uint32_t length = function->bound_arguments()->ulength().value();const
uint32_t target_length = target->length();const
uint32_t capacity = elements()->ulength().value();const
uint32_t c = object->elements()->ulength().value();const
for (uint32_t i = 0; i < names_len; ++i) {Arash Kazemi`names_len` can be `const`, as well the other places where we read the length into a variable.
I didn't think about this in the previous CLs, so let's leave them as is. No need to go back and update all locations. Let's just add `const` from now on.
Good point, I have added const in this CL and will try to address the rest in follow-up CLs.
I don't think we need to go back and update all the other locations from the previous CLs. I assume we'll add const to them whenever we touch them again.
int32_t transitions = raw.ToSmi().value();const
uint32_t grow_by = new_capacity - capacity;const
uint32_t length = wasm_function->length();const
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
uint32_t length = IsJSArray(object)Omer Katzconst
on second thought, this one is pointless since you're returning immediately after.
int32_t transitions = raw.ToSmi().value();Omer Katzconst
on second thought, this one is pointless since you're returning immediately after.
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
uint32_t length = function->length();const
Done
uint32_t index = TransitionArray::kProtoTransitionHeaderSize + i;const
Done
uint32_t nof_bound_arguments = function->bound_arguments()->ulength().value();const
This is modified inside the while loop.
uint32_t length = function->bound_arguments()->ulength().value();const
Done
uint32_t target_length = target->length();const
Done
uint32_t length = IsJSArray(*object)const
Done
uint32_t length = IsJSArray(object)const
Done
uint32_t length = IsJSArray(object)const
Done
uint32_t capacity = elements()->ulength().value();const
Done
uint32_t c = object->elements()->ulength().value();const
Done
uint32_t grow_by = new_capacity - capacity;const
Done
uint32_t length = wasm_function->length();const
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
uint32_t nof_bound_arguments = function->bound_arguments()->ulength().value();Arash Kazemiconst
This is modified inside the while loop.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[objects] Convert usages of FixedArray::length to ulength
Improve robustness in the sandbox attacker model by using unsigned
integer length for FixedArray (see: crrev.com/c/7544875).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |