mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: expose v8util.createIDWeakMap() regardless of enable_remote_module (#23546)
This commit is contained in:
@@ -21,7 +21,7 @@ class AccessDependenciesPlugin {
|
||||
}
|
||||
|
||||
const defines = {
|
||||
BUILDFLAG: ' '
|
||||
BUILDFLAG: ''
|
||||
}
|
||||
|
||||
const buildFlagsPrefix = '--buildflags='
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "base/hash/hash.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "shell/common/api/electron_api_key_weak_map.h"
|
||||
#include "shell/common/gin_converters/content_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/std_converter.h"
|
||||
@@ -16,7 +17,6 @@
|
||||
#include "v8/include/v8-profiler.h"
|
||||
|
||||
#if BUILDFLAG(ENABLE_REMOTE_MODULE)
|
||||
#include "shell/common/api/electron_api_key_weak_map.h"
|
||||
#include "shell/common/api/remote/remote_callback_freer.h"
|
||||
#include "shell/common/api/remote/remote_object_freer.h"
|
||||
#endif
|
||||
@@ -127,12 +127,12 @@ void Initialize(v8::Local<v8::Object> exports,
|
||||
&electron::RemoteCallbackFreer::BindTo);
|
||||
dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo);
|
||||
dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef);
|
||||
dict.SetMethod("createIDWeakMap",
|
||||
&electron::api::KeyWeakMap<int32_t>::Create);
|
||||
dict.SetMethod(
|
||||
"createDoubleIDWeakMap",
|
||||
&electron::api::KeyWeakMap<std::pair<std::string, int32_t>>::Create);
|
||||
#endif
|
||||
dict.SetMethod("createIDWeakMap",
|
||||
&electron::api::KeyWeakMap<int32_t>::Create);
|
||||
dict.SetMethod("requestGarbageCollectionForTesting",
|
||||
&RequestGarbageCollectionForTesting);
|
||||
dict.SetMethod("isSameOrigin", &IsSameOrigin);
|
||||
|
||||
Reference in New Issue
Block a user