Skip to content

Commit

Permalink
use faster github actions runner + add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jul 1, 2024
1 parent 8cc2509 commit 00e8a32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ jobs:
strategy:
matrix:
include:
- runner: windows-2022
- runner: windows
build-type: Release
arch: amd64
suffix: ""
- runner: windows-2022
- runner: windows
build-type: Debug
arch: amd64
suffix: -debug
runs-on: windows-2022
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
steps:
- name: Install VS2022 BuildTools 17.9.7
Expand Down
4 changes: 3 additions & 1 deletion Source/WTF/wtf/URL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,15 +240,17 @@ static String decodeEscapeSequencesFromParsedURLForWindowsPath(const std::span<c
// Fast path: no escape sequences.
// That also means we don't have to worry about non-ASCII characters.
// We just need to normalize slashes.
size_t lastSlash = 0;
size_t lastSlash = input[0] == '/' ? 1 : 0;
size_t index = WTF::find(input, '/', lastSlash);
while (index != notFound) {
ASSERT(index < length);
builder.append(input.subspan(lastSlash, index - lastSlash));
builder.append('\\');
lastSlash = index + 1;
index = WTF::find(input, '/', lastSlash);
}

ASSERT(lastSlash <= length);
builder.append(input.subspan(lastSlash));
return builder.toString();
}
Expand Down

0 comments on commit 00e8a32

Please sign in to comment.