Skip to content

Commit

Permalink
3557253: Deprecate some signature checks
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 3, 2022
1 parent 2f95568 commit da4f0db
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions patches/nan/.patches
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
use_new_constructor_for_scriptorigin_when_17_x.patch
chore_remove_deprecated_accessorsignatures.patch
45 changes: 45 additions & 0 deletions patches/nan/chore_remove_deprecated_accessorsignatures.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Thu, 2 Jun 2022 15:45:21 +0200
Subject: chore: remove deprecated AccessorSignatures

Removed in https://chromium-review.googlesource.com/c/v8/v8/+/3654096
This should be upstreamed to nan.

diff --git a/nan.h b/nan.h
index df5496c1a001120d10cd7c4b87d5e7bce8169f38..c29a99b79970421a15c5520a94ab65b1c3c473ff 100644
--- a/nan.h
+++ b/nan.h
@@ -2516,8 +2516,7 @@ inline void SetAccessor(
, SetterCallback setter = 0
, v8::Local<v8::Value> data = v8::Local<v8::Value>()
, v8::AccessControl settings = v8::DEFAULT
- , v8::PropertyAttribute attribute = v8::None
- , imp::Sig signature = imp::Sig()) {
+ , v8::PropertyAttribute attribute = v8::None) {
HandleScope scope;

imp::NativeGetter getter_ =
@@ -2550,9 +2549,6 @@ inline void SetAccessor(
, obj
, settings
, attribute
-#if (NODE_MODULE_VERSION < NODE_18_0_MODULE_VERSION)
- , signature
-#endif
);
}

diff --git a/nan_callbacks.h b/nan_callbacks.h
index 53ede846ac9a865a737218dabbbd48305d3d6b63..ea81e452d364e3d3c15a121dc69ae21134bfb586 100644
--- a/nan_callbacks.h
+++ b/nan_callbacks.h
@@ -52,8 +52,6 @@ typedef void(*IndexQueryCallback)(
const PropertyCallbackInfo<v8::Integer>&);

namespace imp {
-typedef v8::Local<v8::AccessorSignature> Sig;
-
static const int kDataIndex = 0;

static const int kFunctionIndex = 1;

0 comments on commit da4f0db

Please sign in to comment.