fix: use Node.js isolate setup logic in bindings (#24579)

* fix: use Node.js isolate setup logic in bindings

* Flags should be more process-specific

* Remove redundant isolate function setting

* Remove old SetFatalErrorHandler call
This commit is contained in:
Shelley Vohr
2020-07-20 12:41:52 -07:00
committed by GitHub
parent f0953902db
commit bcba4baa85
8 changed files with 81 additions and 85 deletions

View File

@@ -33,17 +33,6 @@
namespace electron {
namespace {
// Called when there is a fatal error in V8, we just crash the process here so
// we can get the stack trace.
void FatalErrorCallback(const char* location, const char* message) {
LOG(ERROR) << "Fatal error in V8: " << location << " " << message;
ElectronBindings::Crash();
}
} // namespace
ElectronBindings::ElectronBindings(uv_loop_t* loop) {
uv_async_init(loop, &call_next_tick_async_, OnCallNextTick);
call_next_tick_async_.data = this;
@@ -86,8 +75,6 @@ void ElectronBindings::BindProcess(v8::Isolate* isolate,
void ElectronBindings::BindTo(v8::Isolate* isolate,
v8::Local<v8::Object> process) {
isolate->SetFatalErrorHandler(FatalErrorCallback);
gin_helper::Dictionary dict(isolate, process);
BindProcess(isolate, &dict, metrics_.get());