chore: remove node patches by using the preload feature (#41080)

This commit is contained in:
Cheng Zhao 2024-01-25 00:54:32 +09:00 committed by GitHub
parent 031d636823
commit d13a93fb61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 403 additions and 135 deletions

View file

@ -15,8 +15,6 @@
#include "base/process/process_handle.h"
#include "base/process/process_metrics_iocounters.h"
#include "base/system/sys_info.h"
#include "chrome/common/chrome_version.h"
#include "electron/electron_version.h"
#include "services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h"
#include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
#include "shell/browser/browser.h"
@ -84,12 +82,6 @@ void ElectronBindings::BindTo(v8::Isolate* isolate,
dict.SetMethod("activateUvLoop",
base::BindRepeating(&ElectronBindings::ActivateUVLoop,
base::Unretained(this)));
gin_helper::Dictionary versions;
if (dict.Get("versions", &versions)) {
versions.SetReadOnly(ELECTRON_PROJECT_NAME, ELECTRON_VERSION_STRING);
versions.SetReadOnly("chrome", CHROME_VERSION_STRING);
}
}
void ElectronBindings::EnvironmentDestroyed(node::Environment* env) {