Skip to content

Commit ef176ce

Browse files
authored
build: fix building with enable_remote_module = false (electron#23499)
1 parent 633f3c2 commit ef176ce

10 files changed

Lines changed: 13 additions & 13 deletions

BUILD.gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,6 @@ source_set("electron_lib") {
581581

582582
if (enable_remote_module) {
583583
sources += [
584-
"shell/common/api/remote/object_life_monitor.cc",
585-
"shell/common/api/remote/object_life_monitor.h",
586584
"shell/common/api/remote/remote_callback_freer.cc",
587585
"shell/common/api/remote/remote_callback_freer.h",
588586
"shell/common/api/remote/remote_object_freer.cc",

filenames.gni

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ filenames = {
454454
"shell/common/api/electron_bindings.cc",
455455
"shell/common/api/electron_bindings.h",
456456
"shell/common/api/features.cc",
457+
"shell/common/api/object_life_monitor.cc",
458+
"shell/common/api/object_life_monitor.h",
457459
"shell/common/application_info.cc",
458460
"shell/common/application_info.h",
459461
"shell/common/application_info_linux.cc",

shell/common/api/electron_api_v8_util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ void Initialize(v8::Local<v8::Object> exports,
127127
&electron::RemoteCallbackFreer::BindTo);
128128
dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo);
129129
dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef);
130+
dict.SetMethod("createIDWeakMap",
131+
&electron::api::KeyWeakMap<int32_t>::Create);
130132
dict.SetMethod(
131133
"createDoubleIDWeakMap",
132134
&electron::api::KeyWeakMap<std::pair<std::string, int32_t>>::Create);
133135
#endif
134-
dict.SetMethod("createIDWeakMap",
135-
&electron::api::KeyWeakMap<int32_t>::Create);
136136
dict.SetMethod("requestGarbageCollectionForTesting",
137137
&RequestGarbageCollectionForTesting);
138138
dict.SetMethod("isSameOrigin", &IsSameOrigin);

shell/common/api/remote/object_life_monitor.cc renamed to shell/common/api/object_life_monitor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Use of this source code is governed by the MIT license that can be
44
// found in the LICENSE file.
55

6-
#include "shell/common/api/remote/object_life_monitor.h"
6+
#include "shell/common/api/object_life_monitor.h"
77

88
#include "base/bind.h"
99
#include "base/message_loop/message_loop.h"

shell/common/api/remote/object_life_monitor.h renamed to shell/common/api/object_life_monitor.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by the MIT license that can be
33
// found in the LICENSE file.
44

5-
#ifndef SHELL_COMMON_API_REMOTE_OBJECT_LIFE_MONITOR_H_
6-
#define SHELL_COMMON_API_REMOTE_OBJECT_LIFE_MONITOR_H_
5+
#ifndef SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_
6+
#define SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_
77

88
#include "base/macros.h"
99
#include "base/memory/weak_ptr.h"
@@ -31,4 +31,4 @@ class ObjectLifeMonitor {
3131

3232
} // namespace electron
3333

34-
#endif // SHELL_COMMON_API_REMOTE_OBJECT_LIFE_MONITOR_H_
34+
#endif // SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_

shell/common/api/remote/remote_callback_freer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <string>
99

1010
#include "content/public/browser/web_contents_observer.h"
11-
#include "shell/common/api/remote/object_life_monitor.h"
11+
#include "shell/common/api/object_life_monitor.h"
1212

1313
namespace electron {
1414

shell/common/api/remote/remote_object_freer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <map>
99
#include <string>
1010

11-
#include "shell/common/api/remote/object_life_monitor.h"
11+
#include "shell/common/api/object_life_monitor.h"
1212

1313
namespace electron {
1414

shell/renderer/api/context_bridge/object_cache.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <utility>
88

9-
#include "shell/common/api/remote/object_life_monitor.h"
9+
#include "shell/common/api/object_life_monitor.h"
1010

1111
namespace electron {
1212

shell/renderer/api/context_bridge/render_frame_function_store.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <utility>
88

9-
#include "shell/common/api/remote/object_life_monitor.h"
9+
#include "shell/common/api/object_life_monitor.h"
1010

1111
namespace electron {
1212

shell/renderer/api/electron_api_context_bridge.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "base/strings/string_number_conversions.h"
1616
#include "content/public/renderer/render_frame.h"
1717
#include "content/public/renderer/render_frame_observer.h"
18-
#include "shell/common/api/remote/object_life_monitor.h"
18+
#include "shell/common/api/object_life_monitor.h"
1919
#include "shell/common/gin_converters/blink_converter.h"
2020
#include "shell/common/gin_converters/callback_converter.h"
2121
#include "shell/common/gin_helper/dictionary.h"

0 commit comments

Comments
 (0)