Skip to content

Commit

Permalink
src: add support for externally shared js builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Feb 6, 2023
1 parent 1a25030 commit 344ec3d
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -14,10 +14,10 @@ renderer/browser/worker/sandboxed bootstrap scripts). These are loaded
through LoadEmbedderJavaScriptSource()

diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
index 7b820e70df1613a9f5565d6221b71354ff059560..405bda5d83c3312909439082ef69e8f266e53c2e 100644
index bc4555584ab1f97806a1e9cd17085a2488320908..b17dbf2a98c9f4b14fea60c87f05afcee6ec54fb 100644
--- a/lib/internal/fs/watchers.js
+++ b/lib/internal/fs/watchers.js
@@ -290,11 +290,13 @@ function emitCloseNT(self) {
@@ -293,11 +293,13 @@ function emitCloseNT(self) {

// Legacy alias on the C++ wrapper object. This is not public API, so we may
// want to runtime-deprecate it at some point. There's no hurry, though.
Expand All @@ -28,26 +28,26 @@ index 7b820e70df1613a9f5565d6221b71354ff059560..405bda5d83c3312909439082ef69e8f2
-});
+if (!'owner' in FSEvent.prototype) {
+ ObjectDefineProperty(FSEvent.prototype, 'owner', {
+ __proto__: null,
+ __proto__: null,
+ get() { return this[owner_symbol]; },
+ set(v) { return this[owner_symbol] = v; }
+ });
+}

async function* watch(filename, options = {}) {
async function* watch(filename, options = kEmptyObject) {
const path = toNamespacedPath(getValidatedPath(filename));
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
index 9d82a06adcefe386ea230c7cfbdccffb67d0b8c1..6e1a55adbd0b01383f3e54e924864dfeb6a57f0b 100644
index 40d9025746d3c39cf9ea27b6cffc8f2eb7e62c1e..d3a0dd7cedb0d239ae427d1af2335e155345a454 100644
--- a/src/node_builtins.cc
+++ b/src/node_builtins.cc
@@ -32,6 +32,7 @@ BuiltinLoader BuiltinLoader::instance_;
@@ -33,6 +33,7 @@ BuiltinLoader BuiltinLoader::instance_;

BuiltinLoader::BuiltinLoader() : config_(GetConfig()), has_code_cache_(false) {
LoadJavaScriptSource();
+ LoadEmbedderJavaScriptSource();
#if defined(NODE_HAVE_I18N_SUPPORT)
#ifdef NODE_SHARED_BUILTIN_CJS_MODULE_LEXER_LEXER_PATH
AddExternalizedBuiltin(
"internal/deps/cjs-module-lexer/lexer",
diff --git a/src/node_builtins.h b/src/node_builtins.h
index a6fbff98ccb0a7f5fd33cf3b084cfdf47aaa995e..8228e57d27b2f883d87ec12274f2745628caa6e1 100644
--- a/src/node_builtins.h
Expand Down

0 comments on commit 344ec3d

Please sign in to comment.