chore: bumping NAN dep to include test changes (#29686)

This commit is contained in:
Calvin 2021-06-15 14:09:39 -06:00 committed by GitHub
parent af276c96ec
commit 18b03db073
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 48 deletions

5
DEPS
View file

@ -18,7 +18,10 @@ vars = {
'node_version':
'v14.17.0',
'nan_version':
'v2.14.2',
# The following commit hash of NAN is v2.14.2 with *only* changes to the
# test suite. This should be updated to a specific tag when one becomes
# available.
'65b32af46e9d7fab2e4ff657751205b3865f4920',
'squirrel.mac_version':
'cdc0729c8bf8576bfef18629186e1e9ecf1b0d9f',

View file

@ -11,7 +11,5 @@
"src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle",
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC",
"src/electron/patches/nan": "src/third_party/nan"
"src/electron/patches/ReactiveObjC": "src/third_party/squirrel.mac/vendor/ReactiveObjC"
}

View file

@ -1,2 +0,0 @@
api_simplify_scriptorigin.patch
nan_string_test_alignment.patch

View file

@ -1,20 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@github.com>
Date: Wed, 2 Dec 2020 11:19:26 -0500
Subject: Simplify ScriptOrigin
Update nantest to handle changes in https://chromium-review.googlesource.com/c/v8/v8/+/2555005
diff --git a/test/cpp/nannew.cpp b/test/cpp/nannew.cpp
index a489f9405d3d39dfb71375d490ba32f9c05c610d..c6cca837f485ac4a245bd2d4a479e33f6250fd1d 100644
--- a/test/cpp/nannew.cpp
+++ b/test/cpp/nannew.cpp
@@ -246,7 +246,7 @@ NAN_METHOD(testScript) {
t.plan(6);
- ScriptOrigin origin(New("foo").ToLocalChecked(), New(5));
+ ScriptOrigin origin(New("foo").ToLocalChecked(), 5);
t.ok(_( assertType<Script>(New<Script>(
New("2 + 3").ToLocalChecked()).ToLocalChecked())));

View file

@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: clavin <clavin@electronjs.org>
Date: Wed, 12 May 2021 12:43:07 -0600
Subject: nan_string_test_alignment
Modifies a NAN test to avoid a debug check pertaining to efficient string alignment.
diff --git a/test/cpp/strings.cpp b/test/cpp/strings.cpp
index 95edeac91a4ec6a5f5cd80aa36dca8a55eb53f2a..0ad5cb7095490ac1eb454318582a9a683cb14be1 100644
--- a/test/cpp/strings.cpp
+++ b/test/cpp/strings.cpp
@@ -26,7 +26,9 @@ NAN_METHOD(EncodeHex) {
}
NAN_METHOD(EncodeUCS2) {
- info.GetReturnValue().Set(Encode("h\0e\0l\0l\0o\0", 10, UCS2));
+ // This odd declaration is to get the string data aligned to a 2-byte boundary
+ const uint16_t str[] = {'h', 'e', 'l', 'l', 'o'};
+ info.GetReturnValue().Set(Encode(reinterpret_cast<const char*>(str), 10, UCS2));
}
Persistent<v8::FunctionTemplate> returnUtf8String_persistent;