Commit 0e0123a6 authored by jgruber's avatar jgruber Committed by Commit bot

[regexp] Work around gcc bug triggering -Werror=strict-overflow

BUG=v8:5526

Review-Url: https://codereview.chromium.org/2422173003
Cr-Commit-Position: refs/heads/master@{#40368}
parent ff287be9
......@@ -1338,8 +1338,8 @@ MaybeHandle<String> StringReplaceNonGlobalRegExpWithFunction(
}
}
argv[m] = handle(Smi::FromInt(index), isolate);
argv[m + 1] = subject;
argv[argc - 2] = handle(Smi::FromInt(index), isolate);
argv[argc - 1] = subject;
Handle<Object> replacement_obj;
ASSIGN_RETURN_ON_EXCEPTION(
......
......@@ -51,7 +51,8 @@ class Vector {
// Access individual vector elements - checks bounds in debug mode.
T& operator[](int index) const {
DCHECK(0 <= index && index < length_);
DCHECK_LE(0, index);
DCHECK_LT(index, length_);
return start_[index];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment