Post https://github.com/electron/electron/pull/18924 we shouldn't be patching `CompileAndCall` into our node fork, instead that method can quite easily live in our code as a helper.
shell/renderer/atom_sandboxed_renderer_client.cc
v8::Handle<v8::Context> context,
    content::RenderFrame* render_frame) {
  if (injected_frames_.erase(render_frame) == 0)
    return;
  auto* isolate = context->GetIsolate();
  v8::HandleScope handle_scope(isolate);
  v8::Context::Scope context_scope(context);
  InvokeHiddenCallback(context, kLifecycleKey, "onExit");
}
}