Seeing a flaky spec on CI that seems to be related to creating the node environment:

```
not ok 688 <webview> tag nodeintegration attribute loads node symbols after POST navigation when set
  Error: Timeout of 180000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at C:\Users\electron\workspace\electron-win-ia32\spec\node_modules\mocha\lib\runnable.js:232:19
```

On Windows the stack is pretty consistent and appears to be heap corruption:

```
std::_Deallocate(void * _Ptr, unsigned int _Count, unsigned int _Sz) Line 132
std::allocator<char>::deallocate(char * _Ptr, unsigned int _Count) Line 720
std::_Wrap_alloc<std::allocator<char> >::deallocate(char * _Ptr, unsigned int _Count) Line 988
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Tidy(bool _Built, unsigned int _Newsize) Line 2260
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::~basic_string<char,std::char_traits<char>,std::allocator<char> >() Line 1018
std::basic_string<char,std::char_traits<char>,std::allocator<char> >::`scalar deleting destructor'(unsigned int)
std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::destroy<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >(std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _Ptr) Line 745
std::allocator_traits<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::destroy<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >(std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > & _Al, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _Ptr) Line 865
std::_Wrap_alloc<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::destroy<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >(std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _Ptr) Line 1003
std::_Destroy_range1<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _Last, std::_Wrap_alloc<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > & _Al, std::integral_constant<bool,0> __formal) Line 1101
std::_Destroy_range<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::basic_string<char,std::char_traits<char>,std::allocator<char> > *>(std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _Last, std::_Wrap_alloc<std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > & _Al) Line 1118
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Destroy(std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _First, std::basic_string<char,std::char_traits<char>,std::allocator<char> > * _Last) Line 1581
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Tidy() Line 1641
std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::~vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >() Line 977
atom::NodeBindings::CreateEnvironment(v8::Local<v8::Context> context) Line 207
atom::AtomRendererClient::DidCreateScriptContext(v8::Local<v8::Context> context, content::RenderFrame * render_frame) Line 104
atom::AtomRenderFrameObserver::DidCreateScriptContext(v8::Local<v8::Context> context, int extension_group, int world_id) Line 30
```


On macOS the crashes seem sort of different each time. The crashed thread is always a `CompositorTileWorker` but the main thread is always in the middle of creating the new node environment when the crash happens.

```
Thread 0:: CrRendererMain  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fffc8c2f42a __getattrlist + 10
1   libsystem_c.dylib             	0x00007fffc8bb770b realpath$DARWIN_EXTSN + 824
2   libnode.dylib                 	0x0000000105ceb76b uv_exepath + 171 (darwin.c:81)
3   libnode.dylib                 	0x0000000105bea7f8 node::SetupProcessObject(node::Environment*, int, char const* const*, int, char const* const*) + 9736 (node.cc:3306)
4   libnode.dylib                 	0x0000000105bcd8af node::Environment::Start(int, char const* const*, int, char const* const*, bool) + 975 (env.cc:92)
5   libnode.dylib                 	0x0000000105bf0b92 node::CreateEnvironment(node::IsolateData*, v8::Local<v8::Context>, int, char const* const*, int, char const* const*) + 178 (node.cc:4425)
6   com.github.electron.framework 	0x00000001040d43f2 atom::NodeBindings::CreateEnvironment(v8::Local<v8::Context>) + 2722 (node_bindings.cc:176)
7   com.github.electron.framework 	0x00000001040f6b3f atom::AtomRendererClient::DidCreateScriptContext(v8::Local<v8::Context>, content::RenderFrame*) + 319 (atom_renderer_client.cc:104)
8   com.github.electron.framework 	0x00000001040f062e atom::AtomRenderFrameObserver::DidCreateScriptContext(v8::Local<v8::Context>, int, int) + 126 (atom_render_frame_observer.cc:32)
9   libcontent.dylib              	0x0000000109fbae0a content::RenderFrameImpl::didCreateScriptContext(blink::WebLocalFrame*, v8::Local<v8::Context>, int, int) + 218
10  libblink_core.dylib           	0x000000010717989c 0x107114000 + 415900
11  libblink_core.dylib           	0x0000000107136f42 blink::ScriptController::initializeMainWorld() + 82
```

```
Thread 0:: CrRendererMain  Dispatch queue: com.apple.main-thread
0   libv8.dylib                   	0x000000010a92f5b4 0x10a3e5000 + 5547444
1   libv8.dylib                   	0x000000010a927b9a 0x10a3e5000 + 5516186
2   libv8.dylib                   	0x000000010a3edf12 0x10a3e5000 + 36626
3   libv8.dylib                   	0x000000010a3eb7c5 0x10a3e5000 + 26565
4   libv8.dylib                   	0x000000010a3eb3eb 0x10a3e5000 + 25579
5   libv8.dylib                   	0x000000010a409481 v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>) + 289
6   com.github.electron.framework 	0x000000010803f930 bool mate::Dictionary::SetMethod<void (*)()>(base::BasicStringPiece<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > const&, void (* const&)()) + 128 (dictionary.h:113)
7   com.github.electron.framework 	0x0000000108333bff atom::AtomBindings::BindTo(v8::Isolate*, v8::Local<v8::Object>) + 207 (atom_bindings.cc:97)
8   com.github.electron.framework 	0x00000001083c9bb6 atom::AtomRendererClient::DidCreateScriptContext(v8::Local<v8::Context>, content::RenderFrame*) + 438 (atom_renderer_client.cc:108)
9   com.github.electron.framework 	0x00000001083c362e atom::AtomRenderFrameObserver::DidCreateScriptContext(v8::Local<v8::Context>, int, int) + 126 (atom_render_frame_observer.cc:32)
10  libcontent.dylib              	0x000000010decbe0a content::RenderFrameImpl::didCreateScriptContext(blink::WebLocalFrame*, v8::Local<v8::Context>, int, int) + 218
11  libblink_core.dylib           	0x000000010b0b989c 0x10b054000 + 415900
12  libblink_core.dylib           	0x000000010b076f42 blink::ScriptController::initializeMainWorld() + 82
```

```
Thread 0:: CrRendererMain  Dispatch queue: com.apple.main-thread
0   libv8.dylib                   	0x000000010894b1ad 0x10841f000 + 5423533
1   libv8.dylib                   	0x00000001089409bb 0x10841f000 + 5380539
2   libv8.dylib                   	0x000000010894b37f 0x10841f000 + 5423999
3   libv8.dylib                   	0x000000010894c95a 0x10841f000 + 5429594
4   libv8.dylib                   	0x0000000108915024 v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) + 196
5   libv8.dylib                   	0x000000010893bc0e 0x10841f000 + 5360654
6   libv8.dylib                   	0x0000000108a81df3 0x10841f000 + 6696435
7   libv8.dylib                   	0x000000010843b883 v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>) + 291
8   libv8.dylib                   	0x000000010843ba01 v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>) + 113
9   libnode.dylib                 	0x0000000107b8390f node::Environment::SetMethod(v8::Local<v8::Object>, char const*, void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) + 239 (env-inl.h:426)
10  libnode.dylib                 	0x0000000107ba4ef9 node::SetupProcessObject(node::Environment*, int, char const* const*, int, char const* const*) + 11529 (node.cc:3372)
11  libnode.dylib                 	0x0000000107b878af node::Environment::Start(int, char const* const*, int, char const* const*, bool) + 975 (env.cc:92)
12  libnode.dylib                 	0x0000000107baab92 node::CreateEnvironment(node::IsolateData*, v8::Local<v8::Context>, int, char const* const*, int, char const* const*) + 178 (node.cc:4425)
13  com.github.electron.framework 	0x00000001060953f2 atom::NodeBindings::CreateEnvironment(v8::Local<v8::Context>) + 2722 (node_bindings.cc:176)
14  com.github.electron.framework 	0x00000001060b7b3f atom::AtomRendererClient::DidCreateScriptContext(v8::Local<v8::Context>, content::RenderFrame*) + 319 (atom_renderer_client.cc:104)
15  com.github.electron.framework 	0x00000001060b162e atom::AtomRenderFrameObserver::DidCreateScriptContext(v8::Local<v8::Context>, int, int) + 126 (atom_render_frame_observer.cc:32)
16  libcontent.dylib              	0x000000010d01fe0a content::RenderFrameImpl::didCreateScriptContext(blink::WebLocalFrame*, v8::Local<v8::Context>, int, int) + 218
17  libblink_core.dylib           	0x000000010914689c 0x1090e1000 + 415900
18  libblink_core.dylib           	0x0000000109103f42 blink::ScriptController::initializeMainWorld() + 82
```

I think this might be related to #8811, if I comment out the `node:FreeEnvironment` calls I am unable to get it to crash.

The crash is pretty consistent on Windows if you just set this spec to run 1000 times in the same spec runner, it will crash usually after ~100 runs.
atom/renderer/atom_renderer_client.cc
v8::Handle<v8::Context> context, content::RenderFrame* render_frame) {
  
  
  if (!render_frame->IsMainFrame() && !IsDevToolsExtension(render_frame))
    return;
  
  if (!node_integration_initialized_) {
    node_integration_initialized_ = true;
    node_bindings_->Initialize();
    node_bindings_->PrepareMessageLoop();
  }
  
  node::Environment* env = node_bindings_->CreateEnvironment(context);
  
  atom_bindings_->BindTo(env->isolate(), env->process_object());
  AddRenderBindings(env->isolate(), env->process_object());
  
  node_bindings_->LoadEnvironment(env);
  if (node_bindings_->uv_env() == nullptr) {
    
    node_bindings_->set_uv_env(env);
    
    node_bindings_->RunMessageLoop();
  }
}
void AtomRendererClient::WillReleaseScriptContext(