fix: expose v8util.createIDWeakMap() regardless of enable_remote_module (#23546)
This commit is contained in:
parent
54ff423dac
commit
54b6c06062
2 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ class AccessDependenciesPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
const defines = {
|
const defines = {
|
||||||
BUILDFLAG: ' '
|
BUILDFLAG: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const buildFlagsPrefix = '--buildflags='
|
const buildFlagsPrefix = '--buildflags='
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "base/hash/hash.h"
|
#include "base/hash/hash.h"
|
||||||
#include "electron/buildflags/buildflags.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/content_converter.h"
|
||||||
#include "shell/common/gin_converters/gurl_converter.h"
|
#include "shell/common/gin_converters/gurl_converter.h"
|
||||||
#include "shell/common/gin_converters/std_converter.h"
|
#include "shell/common/gin_converters/std_converter.h"
|
||||||
|
@ -16,7 +17,6 @@
|
||||||
#include "v8/include/v8-profiler.h"
|
#include "v8/include/v8-profiler.h"
|
||||||
|
|
||||||
#if BUILDFLAG(ENABLE_REMOTE_MODULE)
|
#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_callback_freer.h"
|
||||||
#include "shell/common/api/remote/remote_object_freer.h"
|
#include "shell/common/api/remote/remote_object_freer.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -127,12 +127,12 @@ void Initialize(v8::Local<v8::Object> exports,
|
||||||
&electron::RemoteCallbackFreer::BindTo);
|
&electron::RemoteCallbackFreer::BindTo);
|
||||||
dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo);
|
dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo);
|
||||||
dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef);
|
dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef);
|
||||||
dict.SetMethod("createIDWeakMap",
|
|
||||||
&electron::api::KeyWeakMap<int32_t>::Create);
|
|
||||||
dict.SetMethod(
|
dict.SetMethod(
|
||||||
"createDoubleIDWeakMap",
|
"createDoubleIDWeakMap",
|
||||||
&electron::api::KeyWeakMap<std::pair<std::string, int32_t>>::Create);
|
&electron::api::KeyWeakMap<std::pair<std::string, int32_t>>::Create);
|
||||||
#endif
|
#endif
|
||||||
|
dict.SetMethod("createIDWeakMap",
|
||||||
|
&electron::api::KeyWeakMap<int32_t>::Create);
|
||||||
dict.SetMethod("requestGarbageCollectionForTesting",
|
dict.SetMethod("requestGarbageCollectionForTesting",
|
||||||
&RequestGarbageCollectionForTesting);
|
&RequestGarbageCollectionForTesting);
|
||||||
dict.SetMethod("isSameOrigin", &IsSameOrigin);
|
dict.SetMethod("isSameOrigin", &IsSameOrigin);
|
||||||
|
|
Loading…
Reference in a new issue