Skip to content

Commit

Permalink
deps: patch for v8 on windows
Browse files Browse the repository at this point in the history
PR-URL: #40010
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
gengjiawen authored and BethGriggs committed Sep 21, 2021
1 parent f03bae7 commit 6775958
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ env:
jobs:
build-windows:
if: github.event.pull_request.draft == false
runs-on: windows-latest
strategy:
matrix:
windows: [windows-2019, windows-2022]
fail-fast: false
runs-on: ${{ matrix.windows }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.12',
'v8_embedder_string': '-node.13',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/objects/fixed-array-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
return get(isolate, index).IsTheHole(isolate);
}

#if !defined(_WIN32) || defined(_WIN64)
#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930)
void FixedArray::set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
Expand Down
6 changes: 3 additions & 3 deletions deps/v8/src/objects/fixed-array.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,16 @@ class FixedArray
inline bool is_the_hole(Isolate* isolate, int index);

// Setter that doesn't need write barrier.
#if defined(_WIN32) && !defined(_WIN64)
#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930)
inline void set(int index, Smi value);
#else
inline void set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
#else
inline void set(int index, Smi value);
#endif

// Setter with explicit barrier mode.
Expand Down

0 comments on commit 6775958

Please sign in to comment.