Skip to content

Commit ceb6182

Browse files
clavinckerr
authored andcommitted
5539888: [api] Remove several APIs deprecated in version 12.6
https://chromium-review.googlesource.com/c/v8/v8/+/5539888 This commit essentially only removes the `only_terminate_in_safe_scope` isolate creation parameter. This undoes some work that was originally done in #35766.
1 parent ccf9a51 commit ceb6182

File tree

1 file changed

+7
-30
lines changed

1 file changed

+7
-30
lines changed

shell/browser/javascript_environment.cc

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -75,38 +75,15 @@ struct base::trace_event::TraceValue::Helper<
7575

7676
namespace electron {
7777

78-
namespace {
79-
80-
gin::IsolateHolder CreateIsolateHolder(v8::Isolate* isolate) {
81-
std::unique_ptr<v8::Isolate::CreateParams> create_params =
82-
gin::IsolateHolder::getDefaultIsolateParams();
83-
// Align behavior with V8 Isolate default for Node.js.
84-
// This is necessary for important aspects of Node.js
85-
// including heap and cpu profilers to function properly.
86-
//
87-
// Additional note:
88-
// We do not want to invoke a termination exception at exit when
89-
// we're running with only_terminate_in_safe_scope set to false. Heap and
90-
// coverage profilers run after environment exit and if there is a pending
91-
// exception at this stage then they will fail to generate the appropriate
92-
// profiles. Node.js does not call node::Stop(), which calls
93-
// isolate->TerminateExecution(), and therefore does not have this issue
94-
// when also running with only_terminate_in_safe_scope set to false.
95-
create_params->only_terminate_in_safe_scope = false;
96-
97-
return gin::IsolateHolder(
98-
base::SingleThreadTaskRunner::GetCurrentDefault(),
99-
gin::IsolateHolder::kSingleThread,
100-
gin::IsolateHolder::IsolateType::kUtility, std::move(create_params),
101-
gin::IsolateHolder::IsolateCreationMode::kNormal, nullptr, isolate);
102-
}
103-
104-
} // namespace
105-
10678
JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop,
10779
bool setup_wasm_streaming)
108-
: isolate_holder_{CreateIsolateHolder(
109-
Initialize(event_loop, setup_wasm_streaming))},
80+
: isolate_holder_(base::SingleThreadTaskRunner::GetCurrentDefault(),
81+
gin::IsolateHolder::kSingleThread,
82+
gin::IsolateHolder::IsolateType::kUtility,
83+
gin::IsolateHolder::getDefaultIsolateParams(),
84+
gin::IsolateHolder::IsolateCreationMode::kNormal,
85+
nullptr,
86+
Initialize(event_loop, setup_wasm_streaming)),
11087
isolate_{isolate_holder_.isolate()},
11188
locker_{isolate_} {
11289
isolate_->Enter();

0 commit comments

Comments
 (0)