Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb17bb9c

Browse files
committed
chore: fixup v8 patch indices
1 parent6b610e9 commitb17bb9c

File tree

1 file changed

+15
-23
lines changed

1 file changed

+15
-23
lines changed

‎patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This is a non-ABI breaking solution added by Node.js in v20.x for:
1111
which are necessary for backporting the vm-related memory fixes in https://github.com/nodejs/node/pull/48510.
1212

1313
diff --git a/include/v8-object.h b/include/v8-object.h
14-
index4ab2e52e0c5dcb344e687e808f39a5cd9f4c736a..c6523c5cc818524160bf5b75af1b54656f1cc7c9 100644
14+
index6cdf53b19c7d058bb66b9fcbe745874cc48daa99..8d112008c2667db97ed5b5af3f87c40d0ef8466a 100644
1515
--- a/include/v8-object.h
1616
+++ b/include/v8-object.h
1717
@@ -20,6 +20,8 @@ class Function;
@@ -23,9 +23,9 @@ index 4ab2e52e0c5dcb344e687e808f39a5cd9f4c736a..c6523c5cc818524160bf5b75af1b5465
2323

2424
/**
2525
* A private symbol
26-
@@ -500,6 +502,21 @@ class V8_EXPORT Object : public Value {
27-
*/
28-
V8_INLINE void* GetAlignedPointerFromInternalField(int index);
26+
@@ -509,6 +511,21 @@ class V8_EXPORT Object : public Value {
27+
index);
28+
}
2929

3030
+ /**
3131
+ * Warning: These are Node.js-specific extentions used to avoid breaking
@@ -42,29 +42,18 @@ index 4ab2e52e0c5dcb344e687e808f39a5cd9f4c736a..c6523c5cc818524160bf5b75af1b5465
4242
+#endif
4343
+ void SetInternalFieldForNodeCore(int index, Local<UnboundScript> value);
4444
+
45-
/** Same as above, but works forPersistentBase. */
45+
/** Same as above, but works forTracedReference. */
4646
V8_INLINE static void* GetAlignedPointerFromInternalField(
47-
constPersistentBase<Object>& object, int index) {
47+
constBasicTracedReference<Object>& object, int index) {
4848
diff --git a/src/api/api.cc b/src/api/api.cc
49-
index3979ae69e897ba4f757b8a5fc3e8f21c21f88137..65997c6c4c0aa256231200092de9fdd2e8b62e6a 100644
49+
index694aec891a48337fa0387d60bcc34e05752ff2f0..5b4ca8498fdadefab29e6258a1f12d7a61f064e6 100644
5050
--- a/src/api/api.cc
5151
+++ b/src/api/api.cc
52-
@@ -6302,14 +6302,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
53-
isolate);
52+
@@ -6319,7 +6319,26 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
5453
}
5554

56-
-void v8::Object::SetInternalField(int index, v8::Local<Data> value) {
55+
void v8::Object::SetInternalField(int index, v8::Local<Data> value) {
5756
- auto obj = Utils::OpenDirectHandle(this);
58-
+template<typename T>
59-
+void SetInternalFieldImpl(v8::Object* receiver, int index, v8::Local<T> value) {
60-
+ auto obj = Utils::OpenDirectHandle(receiver);
61-
const char* location = "v8::Object::SetInternalField()";
62-
if (!InternalFieldOK(obj, index, location)) return;
63-
auto val = Utils::OpenDirectHandle(*value);
64-
i::DirectHandle<i::JSObject>::cast(obj)->SetEmbedderField(index, *val);
65-
}
66-
67-
+void v8::Object::SetInternalField(int index, v8::Local<Data> value) {
6857
+ SetInternalFieldImpl(this, index, value);
6958
+}
7059
+
@@ -82,6 +71,9 @@ index 3979ae69e897ba4f757b8a5fc3e8f21c21f88137..65997c6c4c0aa256231200092de9fdd2
8271
+ SetInternalFieldImpl(this, index, value);
8372
+}
8473
+
85-
void* v8::Object::SlowGetAlignedPointerFromInternalField(int index) {
86-
auto obj = Utils::OpenDirectHandle(this);
87-
const char* location = "v8::Object::GetAlignedPointerFromInternalField()";
74+
+template<typename T>
75+
+void SetInternalFieldImpl(v8::Object* receiver, int index, v8::Local<T> value) {
76+
+ auto obj = Utils::OpenDirectHandle(receiver);
77+
const char* location = "v8::Object::SetInternalField()";
78+
if (!InternalFieldOK(obj, index, location)) return;
79+
auto val = Utils::OpenDirectHandle(*value);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp