Skip to content

Commit 30c7840

Browse files
committed
lib: use null-prototype objects for property descriptors
nodejs/node#43270
1 parent 61e7fad commit 30c7840

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ renderer/browser/worker/sandboxed bootstrap scripts). These are loaded
1414
through LoadEmbedderJavaScriptSource()
1515

1616
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
17-
index b45af42d12ff7df8a9e125e87f51af3456811c23..c84ff7feb07aebf656ada7e37d812d9d8a81300f 100644
17+
index 7b820e70df1613a9f5565d6221b71354ff059560..405bda5d83c3312909439082ef69e8f266e53c2e 100644
1818
--- a/lib/internal/fs/watchers.js
1919
+++ b/lib/internal/fs/watchers.js
20-
@@ -290,10 +290,12 @@ function emitCloseNT(self) {
20+
@@ -290,11 +290,13 @@ function emitCloseNT(self) {
2121

2222
// Legacy alias on the C++ wrapper object. This is not public API, so we may
2323
// want to runtime-deprecate it at some point. There's no hurry, though.
2424
-ObjectDefineProperty(FSEvent.prototype, 'owner', {
25+
- __proto__: null,
2526
- get() { return this[owner_symbol]; },
2627
- set(v) { return this[owner_symbol] = v; }
2728
-});
2829
+if (!'owner' in FSEvent.prototype) {
2930
+ ObjectDefineProperty(FSEvent.prototype, 'owner', {
31+
+ __proto__: null,
3032
+ get() { return this[owner_symbol]; },
3133
+ set(v) { return this[owner_symbol] = v; }
3234
+ });

0 commit comments

Comments
 (0)