Skip to content

Commit

Permalink
update deprecated v8 apis (#147)
Browse files Browse the repository at this point in the history
Thanks for the update!
  • Loading branch information
camillobruni authored and victorgomes committed Aug 11, 2022
1 parent e72a213 commit ddbda80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/inspector_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel,
bool prevent_shutdown)
: delegate_(std::move(delegate)), prevent_shutdown_(prevent_shutdown),
retaining_context_(false) {
session_ = inspector->connect(CONTEXT_GROUP_ID, this, StringView());
session_ = inspector->connect(
CONTEXT_GROUP_ID, this, StringView(), V8Inspector::kFullyTrusted);
node_dispatcher_ = std::make_unique<protocol::UberDispatcher>(this);
tracing_agent_ =
std::make_unique<protocol::TracingAgent>(env, main_thread_);
Expand Down
14 changes: 7 additions & 7 deletions src/node_snapshotable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1329,13 +1329,13 @@ void CompileSerializeMain(const FunctionCallbackInfo<Value>& args) {
};
ScriptCompiler::Source script_source(source, origin);
Local<Function> fn;
if (ScriptCompiler::CompileFunctionInContext(context,
&script_source,
parameters.size(),
parameters.data(),
0,
nullptr,
ScriptCompiler::kEagerCompile)
if (ScriptCompiler::CompileFunction(context,
&script_source,
parameters.size(),
parameters.data(),
0,
nullptr,
ScriptCompiler::kEagerCompile)
.ToLocal(&fn)) {
args.GetReturnValue().Set(fn);
}
Expand Down

0 comments on commit ddbda80

Please sign in to comment.