Skip to content

Commit 19b2657

Browse files
authored
update deprecated v8 apis (#147)
Thanks for the update!
1 parent 86411a9 commit 19b2657

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

src/inspector_agent.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
219219
bool prevent_shutdown)
220220
: delegate_(std::move(delegate)), prevent_shutdown_(prevent_shutdown),
221221
retaining_context_(false) {
222-
session_ = inspector->connect(CONTEXT_GROUP_ID, this, StringView());
222+
session_ = inspector->connect(
223+
CONTEXT_GROUP_ID, this, StringView(), V8Inspector::kFullyTrusted);
223224
node_dispatcher_ = std::make_unique<protocol::UberDispatcher>(this);
224225
tracing_agent_ =
225226
std::make_unique<protocol::TracingAgent>(env, main_thread_);

src/node_native_module.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ MaybeLocal<Function> NativeModuleLoader::LookupAndCompile(
284284
has_cache ? "with" : "without");
285285

286286
MaybeLocal<Function> maybe_fun =
287-
ScriptCompiler::CompileFunctionInContext(context,
288-
&script_source,
289-
parameters->size(),
290-
parameters->data(),
291-
0,
292-
nullptr,
293-
options);
287+
ScriptCompiler::CompileFunction(context,
288+
&script_source,
289+
parameters->size(),
290+
parameters->data(),
291+
0,
292+
nullptr,
293+
options);
294294

295295
// This could fail when there are early errors in the native modules,
296296
// e.g. the syntax errors

src/node_snapshotable.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,13 @@ void CompileSerializeMain(const FunctionCallbackInfo<Value>& args) {
487487
};
488488
ScriptCompiler::Source script_source(source, origin);
489489
Local<Function> fn;
490-
if (ScriptCompiler::CompileFunctionInContext(context,
491-
&script_source,
492-
parameters.size(),
493-
parameters.data(),
494-
0,
495-
nullptr,
496-
ScriptCompiler::kEagerCompile)
490+
if (ScriptCompiler::CompileFunction(context,
491+
&script_source,
492+
parameters.size(),
493+
parameters.data(),
494+
0,
495+
nullptr,
496+
ScriptCompiler::kEagerCompile)
497497
.ToLocal(&fn)) {
498498
args.GetReturnValue().Set(fn);
499499
}

0 commit comments

Comments
 (0)