File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,15 @@ const {
3
3
prepareMainThreadExecution,
4
4
markBootstrapComplete,
5
5
} = require ( 'internal/process/pre_execution' ) ;
6
- const { isExperimentalSeaWarningDisabled , isSea } = internalBinding ( 'sea' ) ;
6
+ const { isExperimentalSeaWarningNeeded } = internalBinding ( 'sea' ) ;
7
7
const { emitExperimentalWarning } = require ( 'internal/util' ) ;
8
8
const { embedderRequire, embedderRunCjs } = require ( 'internal/util/embedding' ) ;
9
9
const { getEmbedderEntryFunction } = internalBinding ( 'mksnapshot' ) ;
10
10
11
11
prepareMainThreadExecution ( false , true ) ;
12
12
markBootstrapComplete ( ) ;
13
13
14
- if ( isSea ( ) && ! isExperimentalSeaWarningDisabled ( ) ) {
14
+ if ( isExperimentalSeaWarningNeeded ( ) ) {
15
15
emitExperimentalWarning ( 'Single executable application' ) ;
16
16
}
17
17
Original file line number Diff line number Diff line change @@ -105,13 +105,9 @@ bool IsSingleExecutable() {
105
105
return postject_has_resource ();
106
106
}
107
107
108
- void IsSingleExecutable (const FunctionCallbackInfo<Value>& args) {
109
- args.GetReturnValue ().Set (IsSingleExecutable ());
110
- }
111
-
112
- void IsExperimentalSeaWarningDisabled (const FunctionCallbackInfo<Value>& args) {
108
+ void IsExperimentalSeaWarningNeeded (const FunctionCallbackInfo<Value>& args) {
113
109
SeaResource sea_resource = FindSingleExecutableResource ();
114
- args.GetReturnValue ().Set (static_cast <bool >(
110
+ args.GetReturnValue ().Set (! static_cast <bool >(
115
111
sea_resource.flags & SeaFlags::kDisableExperimentalSeaWarning ));
116
112
}
117
113
@@ -243,16 +239,14 @@ void Initialize(Local<Object> target,
243
239
Local<Value> unused,
244
240
Local<Context> context,
245
241
void * priv) {
246
- SetMethod (context, target, " isSea" , IsSingleExecutable);
247
242
SetMethod (context,
248
243
target,
249
- " isExperimentalSeaWarningDisabled " ,
250
- IsExperimentalSeaWarningDisabled );
244
+ " isExperimentalSeaWarningNeeded " ,
245
+ IsExperimentalSeaWarningNeeded );
251
246
}
252
247
253
248
void RegisterExternalReferences (ExternalReferenceRegistry* registry) {
254
- registry->Register (IsSingleExecutable);
255
- registry->Register (IsExperimentalSeaWarningDisabled);
249
+ registry->Register (IsExperimentalSeaWarningNeeded);
256
250
}
257
251
258
252
} // namespace sea
You can’t perform that action at this time.
0 commit comments