Electron Version: 3.0.0-beta.1
Operating System (Platform and Version): macOS
Last known working Electron version: 2.0.3

When running test on macOS, a random crash may happen in the main process:

```
Thread 0 Crashed:: CrBrowserMain  Dispatch queue: com.apple.main-thread
  0   libcontent.dylib              	0x000000010f75c36b 0x10f463000 + 3117931
  1   libcontent.dylib              	0x000000010f75be82 0x10f463000 + 3116674
  2   libcontent.dylib              	0x000000011439caff 0x10f463000 + 83073791
  3   libcontent.dylib              	0x000000011439c559 0x10f463000 + 83072345
  4   com.apple.SkyLight            	0x00007fffc9c0d677 displayWillConfigNotifyProc + 440
  5   com.apple.SkyLight            	0x00007fffc9c0dc1d displayAcceleratorChangedProc + 422
  6   com.apple.SkyLight            	0x00007fffc9d1508d CGSPostLocalNotification + 612
  7   com.apple.SkyLight            	0x00007fffc9d14ae4 (anonymous namespace)::notify_datagram_handler(unsigned int, CGSDatagramType, void*, unsigned long, void*) + 82
  8   com.apple.SkyLight            	0x00007fffc9cc48c9 CGSDatagramReadStream::dispatch_next_main_queue_datagram() + 283
  9   com.apple.SkyLight            	0x00007fffc9cc4799 ___ZN21CGSDatagramReadStream35dispatch_main_queue_datagrams_asyncEP16dispatch_queue_sPS__block_invoke + 55
  10  libdispatch.dylib             	0x00007fffcd818524 _dispatch_call_block_and_release + 12
  11  libdispatch.dylib             	0x00007fffcd80f8fc _dispatch_client_callout + 8
  12  libdispatch.dylib             	0x00007fffcd81caac _dispatch_main_queue_callback_4CF + 925
```

It seems to be related to GPU rendering, and I believe it is responsible for our flaky macOS CI.
atom/browser/api/frame_subscriber.cc
gfx::Rect FrameSubscriber::GetDamageRect() {
  auto* view = web_contents()->GetRenderWidgetHostView();
  if (view == nullptr)
    return gfx::Rect();
  auto* view_base = static_cast<content::RenderWidgetHostViewBase*>(view);
  viz::SurfaceManager* surface_manager =
      content::GetFrameSinkManager()->surface_manager();
  viz::Surface* surface =
      surface_manager->GetSurfaceForId(view_base->GetCurrentSurfaceId());
  if (surface == nullptr)
    return gfx::Rect();
  if (surface->HasActiveFrame()) {
    const viz::CompositorFrame& frame = surface->GetActiveFrame();
    viz::RenderPass* root_pass = frame.render_pass_list.back().get();
    gfx::Size frame_size = root_pass->output_rect.size();
    gfx::Rect damage_rect =
        gfx::ToEnclosingRect(gfx::RectF(root_pass->damage_rect));
    damage_rect.Intersect(gfx::Rect(frame_size));
    return gfx::ScaleToEnclosedRect(damage_rect,
                                    1.0f / frame.device_scale_factor());
  } else {
    return gfx::Rect();
  }
}
void FrameSubscriber::DidReceiveCompositorFrame() {