<p dir="auto">Failed CHECK while running tests here <a href="https://mac-ci.electronjs.org/blue/organizations/jenkins/Electron%20org%2Felectron/detail/PR-11321/3/pipeline/" rel="nofollow">https://mac-ci.electronjs.org/blue/organizations/jenkins/Electron%20org%2Felectron/detail/PR-11321/3/pipeline/</a><br>
I'm not sure on what test exactly, and if the failure is stable.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ok 163 BrowserWindow module &quot;webPreferences&quot; option nativeWindowOpen option retains the original web preferences when window.location is changed to a new origin
[32195:1207/101313.842623:FATAL:wrappable.cc(27)] Check failed: !wrapper_.IsEmpty(). 
0   libbase.dylib                       0x00000001081f6fee base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x00000001081f70bd base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x00000001081f543c base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x00000001082879af logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x0000000108285325 logging::LogMessage::~LogMessage() + 21
5   Electron Framework                  0x0000000104b3fd3f mate::WrappableBase::GetWrapper() + 175
6   Electron Framework                  0x00000001047bbef5 mate::EventEmitter&lt;atom::api::WebContents&gt;::GetWrapper() + 21
7   Electron Framework                  0x00000001047c3e62 bool mate::EventEmitter&lt;atom::api::WebContents&gt;::EmitWithSender&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, content::WebContents*, IPC::Message*, int const&amp;) + 98
8   Electron Framework                  0x00000001047aaecc bool mate::EventEmitter&lt;atom::api::WebContents&gt;::Emit&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, int const&amp;) + 44
9   Electron Framework                  0x00000001047aae8f atom::api::WebContents::RenderViewDeleted(content::RenderViewHost*) + 95
10  Electron Framework                  0x00000001047a83a3 atom::api::WebContents::~WebContents() + 307
11  Electron Framework                  0x00000001047a87b5 atom::api::WebContents::~WebContents() + 21
12  Electron Framework                  0x00000001047a8899 atom::api::WebContents::~WebContents() + 25
13  Electron Framework                  0x0000000104b40318 mate::WrappableBase::SecondWeakCallback(v8::WeakCallbackInfo&lt;mate::WrappableBase&gt; const&amp;) + 56
14  libv8.dylib                         0x000000010798586c v8::internal::FlagList::Hash() + 91916
15  libv8.dylib                         0x00000001079863c3 v8::internal::FlagList::Hash() + 94819
16  libv8.dylib                         0x000000010798645f v8::internal::FlagList::Hash() + 94975
17  libv8.dylib                         0x000000010799c9fa v8::internal::Heap::CreateFillerObjectAt(unsigned char*, int, v8::internal::ClearRecordedSlots) + 3146
18  libv8.dylib                         0x000000010799b694 v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 30196
19  libv8.dylib                         0x000000010799bb2b v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 31371
20  libv8.dylib                         0x000000010756789a v8::Isolate::LowMemoryNotification() + 314
21  Electron Framework                  0x0000000104842b5d void base::internal::FunctorTraits&lt;void (v8::Isolate::*)(), void&gt;::Invoke&lt;v8::Isolate*&gt;(void (v8::Isolate::*)(), v8::Isolate*&amp;&amp;) + 125
22  Electron Framework                  0x0000000104842aa4 void base::internal::InvokeHelper&lt;false, void&gt;::MakeItSo&lt;void (v8::Isolate::* const&amp;)(), v8::Isolate*&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), v8::Isolate*&amp;&amp;) + 68
23  Electron Framework                  0x0000000104842a55 void base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::RunImpl&lt;void (v8::Isolate::* const&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;, 0ul&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;&amp;&amp;, base::IndexSequence&lt;0ul&gt;) + 85
24  Electron Framework                  0x000000010484299c base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::Run(base::internal::BindStateBase*) + 44
25  libbase.dylib                       0x000000010818f26d base::AtExitManager::RegisterTask(base::Callback&lt;void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1&gt;) + 333
26  libbase.dylib                       0x00000001084cd4b6 base::Timer::RunScheduledTask() + 294
27  libbase.dylib                       0x00000001084cd319 base::Timer::GetTaskRunner() + 329
28  libbase.dylib                       0x00000001084cd80d base::Timer::RunScheduledTask() + 1149
29  libbase.dylib                       0x00000001084cd754 base::Timer::RunScheduledTask() + 964
30  libbase.dylib                       0x00000001084cd6e3 base::Timer::RunScheduledTask() + 851
31  libbase.dylib                       0x00000001084cd629 base::Timer::RunScheduledTask() + 665
32  libbase.dylib                       0x000000010819840f base::BarrierClosure(int, base::Callback&lt;void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0&gt;) + 703
33  libbase.dylib                       0x00000001081f9590 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 1040
34  libbase.dylib                       0x00000001082d6b96 base::MessageLoop::RunTask(base::PendingTask*) + 710
35  libbase.dylib                       0x00000001082d7007 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 71
36  libbase.dylib                       0x00000001082d88b2 base::MessageLoop::DoDelayedWork(base::TimeTicks*) + 2178
37  libbase.dylib                       0x00000001082e6aad base::MessagePumpCFRunLoopBase::RunWork() + 157
38  libbase.dylib                       0x00000001082e69fc base::MessagePumpCFRunLoopBase::CanInvalidateCFRunLoopTimers() + 716
39  libbase.dylib                       0x000000010828fbca base::mac::CallWithEHFrame(void () block_pointer) + 10
40  libbase.dylib                       0x00000001082e5f05 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 101
41  CoreFoundation                      0x00007fffd34cd3e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
42  CoreFoundation                      0x00007fffd34ae65c __CFRunLoopDoSources0 + 556
43  CoreFoundation                      0x00007fffd34adb46 __CFRunLoopRun + 934
44  CoreFoundation                      0x00007fffd34ad544 CFRunLoopRunSpecific + 420
45  HIToolbox                           0x00007fffd2a0cebc RunCurrentEventLoopInMode + 240
46  HIToolbox                           0x00007fffd2a0ccf1 ReceiveNextEventCommon + 432
47  HIToolbox                           0x00007fffd2a0cb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
48  AppKit                              0x00007fffd0fa3a54 _DPSNextEvent + 1120
49  AppKit                              0x00007fffd171f7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
50  AppKit                              0x00007fffd0f983db -[NSApplication run] + 926
51  libbase.dylib                       0x00000001082e773c base::MessagePumpNSRunLoop::Quit() + 604
52  libbase.dylib                       0x00000001082e56ee base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
53  libbase.dylib                       0x00000001082d650b base::MessageLoop::Run() + 299
54  libbase.dylib                       0x00000001083bd9dd base::RunLoop::Run() + 125
55  libcontent.dylib                    0x0000000110afdb97 content::BrowserMainLoop::MainMessageLoopRun() + 263
56  libcontent.dylib                    0x0000000110afd948 content::BrowserMainLoop::RunMainMessageLoopParts() + 488
57  libcontent.dylib                    0x0000000110b06fab content::BrowserMainRunner::ExitedMainMessageLoop() + 3339
58  libcontent.dylib                    0x0000000110af1acd content::BrowserMain(content::MainFunctionParams const&amp;) + 397
59  libcontent.dylib                    0x0000000112f44125 content::ContentMain(content::ContentMainParams const&amp;) + 741
60  libcontent.dylib                    0x0000000112f4590c content::ContentMainRunner::Create() + 5772
61  libcontent.dylib                    0x0000000112f4273d content::CreateInProcessUtilityThread(content::InProcessChildThreadParams const&amp;) + 281821"><pre class="notranslate"><code class="notranslate">ok 163 BrowserWindow module "webPreferences" option nativeWindowOpen option retains the original web preferences when window.location is changed to a new origin
[32195:1207/101313.842623:FATAL:wrappable.cc(27)] Check failed: !wrapper_.IsEmpty(). 
0   libbase.dylib                       0x00000001081f6fee base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x00000001081f70bd base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x00000001081f543c base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x00000001082879af logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x0000000108285325 logging::LogMessage::~LogMessage() + 21
5   Electron Framework                  0x0000000104b3fd3f mate::WrappableBase::GetWrapper() + 175
6   Electron Framework                  0x00000001047bbef5 mate::EventEmitter&lt;atom::api::WebContents&gt;::GetWrapper() + 21
7   Electron Framework                  0x00000001047c3e62 bool mate::EventEmitter&lt;atom::api::WebContents&gt;::EmitWithSender&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, content::WebContents*, IPC::Message*, int const&amp;) + 98
8   Electron Framework                  0x00000001047aaecc bool mate::EventEmitter&lt;atom::api::WebContents&gt;::Emit&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, int const&amp;) + 44
9   Electron Framework                  0x00000001047aae8f atom::api::WebContents::RenderViewDeleted(content::RenderViewHost*) + 95
10  Electron Framework                  0x00000001047a83a3 atom::api::WebContents::~WebContents() + 307
11  Electron Framework                  0x00000001047a87b5 atom::api::WebContents::~WebContents() + 21
12  Electron Framework                  0x00000001047a8899 atom::api::WebContents::~WebContents() + 25
13  Electron Framework                  0x0000000104b40318 mate::WrappableBase::SecondWeakCallback(v8::WeakCallbackInfo&lt;mate::WrappableBase&gt; const&amp;) + 56
14  libv8.dylib                         0x000000010798586c v8::internal::FlagList::Hash() + 91916
15  libv8.dylib                         0x00000001079863c3 v8::internal::FlagList::Hash() + 94819
16  libv8.dylib                         0x000000010798645f v8::internal::FlagList::Hash() + 94975
17  libv8.dylib                         0x000000010799c9fa v8::internal::Heap::CreateFillerObjectAt(unsigned char*, int, v8::internal::ClearRecordedSlots) + 3146
18  libv8.dylib                         0x000000010799b694 v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 30196
19  libv8.dylib                         0x000000010799bb2b v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 31371
20  libv8.dylib                         0x000000010756789a v8::Isolate::LowMemoryNotification() + 314
21  Electron Framework                  0x0000000104842b5d void base::internal::FunctorTraits&lt;void (v8::Isolate::*)(), void&gt;::Invoke&lt;v8::Isolate*&gt;(void (v8::Isolate::*)(), v8::Isolate*&amp;&amp;) + 125
22  Electron Framework                  0x0000000104842aa4 void base::internal::InvokeHelper&lt;false, void&gt;::MakeItSo&lt;void (v8::Isolate::* const&amp;)(), v8::Isolate*&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), v8::Isolate*&amp;&amp;) + 68
23  Electron Framework                  0x0000000104842a55 void base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::RunImpl&lt;void (v8::Isolate::* const&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;, 0ul&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;&amp;&amp;, base::IndexSequence&lt;0ul&gt;) + 85
24  Electron Framework                  0x000000010484299c base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::Run(base::internal::BindStateBase*) + 44
25  libbase.dylib                       0x000000010818f26d base::AtExitManager::RegisterTask(base::Callback&lt;void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1&gt;) + 333
26  libbase.dylib                       0x00000001084cd4b6 base::Timer::RunScheduledTask() + 294
27  libbase.dylib                       0x00000001084cd319 base::Timer::GetTaskRunner() + 329
28  libbase.dylib                       0x00000001084cd80d base::Timer::RunScheduledTask() + 1149
29  libbase.dylib                       0x00000001084cd754 base::Timer::RunScheduledTask() + 964
30  libbase.dylib                       0x00000001084cd6e3 base::Timer::RunScheduledTask() + 851
31  libbase.dylib                       0x00000001084cd629 base::Timer::RunScheduledTask() + 665
32  libbase.dylib                       0x000000010819840f base::BarrierClosure(int, base::Callback&lt;void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0&gt;) + 703
33  libbase.dylib                       0x00000001081f9590 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 1040
34  libbase.dylib                       0x00000001082d6b96 base::MessageLoop::RunTask(base::PendingTask*) + 710
35  libbase.dylib                       0x00000001082d7007 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 71
36  libbase.dylib                       0x00000001082d88b2 base::MessageLoop::DoDelayedWork(base::TimeTicks*) + 2178
37  libbase.dylib                       0x00000001082e6aad base::MessagePumpCFRunLoopBase::RunWork() + 157
38  libbase.dylib                       0x00000001082e69fc base::MessagePumpCFRunLoopBase::CanInvalidateCFRunLoopTimers() + 716
39  libbase.dylib                       0x000000010828fbca base::mac::CallWithEHFrame(void () block_pointer) + 10
40  libbase.dylib                       0x00000001082e5f05 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 101
41  CoreFoundation                      0x00007fffd34cd3e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
42  CoreFoundation                      0x00007fffd34ae65c __CFRunLoopDoSources0 + 556
43  CoreFoundation                      0x00007fffd34adb46 __CFRunLoopRun + 934
44  CoreFoundation                      0x00007fffd34ad544 CFRunLoopRunSpecific + 420
45  HIToolbox                           0x00007fffd2a0cebc RunCurrentEventLoopInMode + 240
46  HIToolbox                           0x00007fffd2a0ccf1 ReceiveNextEventCommon + 432
47  HIToolbox                           0x00007fffd2a0cb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
48  AppKit                              0x00007fffd0fa3a54 _DPSNextEvent + 1120
49  AppKit                              0x00007fffd171f7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
50  AppKit                              0x00007fffd0f983db -[NSApplication run] + 926
51  libbase.dylib                       0x00000001082e773c base::MessagePumpNSRunLoop::Quit() + 604
52  libbase.dylib                       0x00000001082e56ee base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
53  libbase.dylib                       0x00000001082d650b base::MessageLoop::Run() + 299
54  libbase.dylib                       0x00000001083bd9dd base::RunLoop::Run() + 125
55  libcontent.dylib                    0x0000000110afdb97 content::BrowserMainLoop::MainMessageLoopRun() + 263
56  libcontent.dylib                    0x0000000110afd948 content::BrowserMainLoop::RunMainMessageLoopParts() + 488
57  libcontent.dylib                    0x0000000110b06fab content::BrowserMainRunner::ExitedMainMessageLoop() + 3339
58  libcontent.dylib                    0x0000000110af1acd content::BrowserMain(content::MainFunctionParams const&amp;) + 397
59  libcontent.dylib                    0x0000000112f44125 content::ContentMain(content::ContentMainParams const&amp;) + 741
60  libcontent.dylib                    0x0000000112f4590c content::ContentMainRunner::Create() + 5772
61  libcontent.dylib                    0x0000000112f4273d content::CreateInProcessUtilityThread(content::InProcessChildThreadParams const&amp;) + 281821
</code></pre></div>
<ul dir="auto">
<li>Electron version: 1.6.7</li>
<li>Operating system: Linux 4.9.0-2 x64</li>
</ul>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto"><code class="notranslate">webContents.create().executeJavaScript()</code> should not hang and crash.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Running the following code in a minimal electron app (nothing but the <code class="notranslate">index.html</code>, basic <code class="notranslate">index.js</code> and <code class="notranslate">app.js</code> results in a hang and crash.</p>
<h3 dir="auto">How to reproduce</h3>
<p dir="auto">index.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow

const path = require('path')
const url = require('url')

let mainWindow

function createWindow () {
  mainWindow = new BrowserWindow({width: 800, height: 600})
  mainWindow.loadURL(url.format({
    pathname: path.join(__dirname, 'index.html'),
    protocol: 'file:',
    slashes: true
  }))
  mainWindow.on('closed', () =&gt;
    mainWindow = null
  )
}

app.on('ready', createWindow)"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">electron</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-s1">electron</span><span class="pl-kos">.</span><span class="pl-c1">app</span>
<span class="pl-k">const</span> <span class="pl-v">BrowserWindow</span> <span class="pl-c1">=</span> <span class="pl-s1">electron</span><span class="pl-kos">.</span><span class="pl-c1">BrowserWindow</span>

<span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'path'</span><span class="pl-kos">)</span>
<span class="pl-k">const</span> <span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'url'</span><span class="pl-kos">)</span>

<span class="pl-k">let</span> <span class="pl-s1">mainWindow</span>

<span class="pl-k">function</span> <span class="pl-en">createWindow</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BrowserWindow</span><span class="pl-kos">(</span><span class="pl-kos">{</span><span class="pl-c1">width</span>: <span class="pl-c1">800</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-c1">600</span><span class="pl-kos">}</span><span class="pl-kos">)</span>
  <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">loadURL</span><span class="pl-kos">(</span><span class="pl-s1">url</span><span class="pl-kos">.</span><span class="pl-en">format</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
    <span class="pl-c1">pathname</span>: <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">'index.html'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
    <span class="pl-c1">protocol</span>: <span class="pl-s">'file:'</span><span class="pl-kos">,</span>
    <span class="pl-c1">slashes</span>: <span class="pl-c1">true</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
  <span class="pl-s1">mainWindow</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'closed'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span>
    <span class="pl-s1">mainWindow</span> <span class="pl-c1">=</span> <span class="pl-c1">null</span>
  <span class="pl-kos">)</span>
<span class="pl-kos">}</span>

<span class="pl-s1">app</span><span class="pl-kos">.</span><span class="pl-en">on</span><span class="pl-kos">(</span><span class="pl-s">'ready'</span><span class="pl-kos">,</span> <span class="pl-s1">createWindow</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">app.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { remote } = require('electron')

const contents = remote.webContents.create()
contents.executeJavaScript('console.log(this)')
  .then(console.log)
  .catch(console.error)
"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> remote <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'electron'</span><span class="pl-kos">)</span>

<span class="pl-k">const</span> <span class="pl-s1">contents</span> <span class="pl-c1">=</span> <span class="pl-s1">remote</span><span class="pl-kos">.</span><span class="pl-c1">webContents</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-s1">contents</span><span class="pl-kos">.</span><span class="pl-en">executeJavaScript</span><span class="pl-kos">(</span><span class="pl-s">'console.log(this)'</span><span class="pl-kos">)</span>
  <span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">log</span><span class="pl-kos">)</span>
  <span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-c1">error</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Wait approximately 15-20 seconds.</p>
<p dir="auto">Crash:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; electron .                
                            
[32195:1207/101313.842623:FATAL:wrappable.cc(27)] Check failed: !wrapper_.IsEmpty(). 
0   libbase.dylib                       0x00000001081f6fee base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x00000001081f70bd base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x00000001081f543c base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x00000001082879af logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x0000000108285325 logging::LogMessage::~LogMessage() + 21
5   Electron Framework                  0x0000000104b3fd3f mate::WrappableBase::GetWrapper() + 175
6   Electron Framework                  0x00000001047bbef5 mate::EventEmitter&lt;atom::api::WebContents&gt;::GetWrapper() + 21
7   Electron Framework                  0x00000001047c3e62 bool mate::EventEmitter&lt;atom::api::WebContents&gt;::EmitWithSender&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, content::WebContents*, IPC::Message*, int const&amp;) + 98
8   Electron Framework                  0x00000001047aaecc bool mate::EventEmitter&lt;atom::api::WebContents&gt;::Emit&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, int const&amp;) + 44
9   Electron Framework                  0x00000001047aae8f atom::api::WebContents::RenderViewDeleted(content::RenderViewHost*) + 95
10  Electron Framework                  0x00000001047a83a3 atom::api::WebContents::~WebContents() + 307
11  Electron Framework                  0x00000001047a87b5 atom::api::WebContents::~WebContents() + 21
12  Electron Framework                  0x00000001047a8899 atom::api::WebContents::~WebContents() + 25
13  Electron Framework                  0x0000000104b40318 mate::WrappableBase::SecondWeakCallback(v8::WeakCallbackInfo&lt;mate::WrappableBase&gt; const&amp;) + 56
14  libv8.dylib                         0x000000010798586c v8::internal::FlagList::Hash() + 91916
15  libv8.dylib                         0x00000001079863c3 v8::internal::FlagList::Hash() + 94819
16  libv8.dylib                         0x000000010798645f v8::internal::FlagList::Hash() + 94975
17  libv8.dylib                         0x000000010799c9fa v8::internal::Heap::CreateFillerObjectAt(unsigned char*, int, v8::internal::ClearRecordedSlots) + 3146
18  libv8.dylib                         0x000000010799b694 v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 30196
19  libv8.dylib                         0x000000010799bb2b v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 31371
20  libv8.dylib                         0x000000010756789a v8::Isolate::LowMemoryNotification() + 314
21  Electron Framework                  0x0000000104842b5d void base::internal::FunctorTraits&lt;void (v8::Isolate::*)(), void&gt;::Invoke&lt;v8::Isolate*&gt;(void (v8::Isolate::*)(), v8::Isolate*&amp;&amp;) + 125
22  Electron Framework                  0x0000000104842aa4 void base::internal::InvokeHelper&lt;false, void&gt;::MakeItSo&lt;void (v8::Isolate::* const&amp;)(), v8::Isolate*&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), v8::Isolate*&amp;&amp;) + 68
23  Electron Framework                  0x0000000104842a55 void base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::RunImpl&lt;void (v8::Isolate::* const&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;, 0ul&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;&amp;&amp;, base::IndexSequence&lt;0ul&gt;) + 85
24  Electron Framework                  0x000000010484299c base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::Run(base::internal::BindStateBase*) + 44
25  libbase.dylib                       0x000000010818f26d base::AtExitManager::RegisterTask(base::Callback&lt;void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1&gt;) + 333
26  libbase.dylib                       0x00000001084cd4b6 base::Timer::RunScheduledTask() + 294
27  libbase.dylib                       0x00000001084cd319 base::Timer::GetTaskRunner() + 329
28  libbase.dylib                       0x00000001084cd80d base::Timer::RunScheduledTask() + 1149
29  libbase.dylib                       0x00000001084cd754 base::Timer::RunScheduledTask() + 964
30  libbase.dylib                       0x00000001084cd6e3 base::Timer::RunScheduledTask() + 851
31  libbase.dylib                       0x00000001084cd629 base::Timer::RunScheduledTask() + 665
32  libbase.dylib                       0x000000010819840f base::BarrierClosure(int, base::Callback&lt;void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0&gt;) + 703
33  libbase.dylib                       0x00000001081f9590 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 1040
34  libbase.dylib                       0x00000001082d6b96 base::MessageLoop::RunTask(base::PendingTask*) + 710
35  libbase.dylib                       0x00000001082d7007 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 71
36  libbase.dylib                       0x00000001082d88b2 base::MessageLoop::DoDelayedWork(base::TimeTicks*) + 2178
37  libbase.dylib                       0x00000001082e6aad base::MessagePumpCFRunLoopBase::RunWork() + 157
38  libbase.dylib                       0x00000001082e69fc base::MessagePumpCFRunLoopBase::CanInvalidateCFRunLoopTimers() + 716
39  libbase.dylib                       0x000000010828fbca base::mac::CallWithEHFrame(void () block_pointer) + 10
40  libbase.dylib                       0x00000001082e5f05 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 101
41  CoreFoundation                      0x00007fffd34cd3e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
42  CoreFoundation                      0x00007fffd34ae65c __CFRunLoopDoSources0 + 556
43  CoreFoundation                      0x00007fffd34adb46 __CFRunLoopRun + 934
44  CoreFoundation                      0x00007fffd34ad544 CFRunLoopRunSpecific + 420
45  HIToolbox                           0x00007fffd2a0cebc RunCurrentEventLoopInMode + 240
46  HIToolbox                           0x00007fffd2a0ccf1 ReceiveNextEventCommon + 432
47  HIToolbox                           0x00007fffd2a0cb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
48  AppKit                              0x00007fffd0fa3a54 _DPSNextEvent + 1120
49  AppKit                              0x00007fffd171f7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
50  AppKit                              0x00007fffd0f983db -[NSApplication run] + 926
51  libbase.dylib                       0x00000001082e773c base::MessagePumpNSRunLoop::Quit() + 604
52  libbase.dylib                       0x00000001082e56ee base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
53  libbase.dylib                       0x00000001082d650b base::MessageLoop::Run() + 299
54  libbase.dylib                       0x00000001083bd9dd base::RunLoop::Run() + 125
55  libcontent.dylib                    0x0000000110afdb97 content::BrowserMainLoop::MainMessageLoopRun() + 263
56  libcontent.dylib                    0x0000000110afd948 content::BrowserMainLoop::RunMainMessageLoopParts() + 488
57  libcontent.dylib                    0x0000000110b06fab content::BrowserMainRunner::ExitedMainMessageLoop() + 3339
58  libcontent.dylib                    0x0000000110af1acd content::BrowserMain(content::MainFunctionParams const&amp;) + 397
59  libcontent.dylib                    0x0000000112f44125 content::ContentMain(content::ContentMainParams const&amp;) + 741
60  libcontent.dylib                    0x0000000112f4590c content::ContentMainRunner::Create() + 5772
61  libcontent.dylib                    0x0000000112f4273d content::CreateInProcessUtilityThread(content::InProcessChildThreadParams const&amp;) + 281821"><pre class="notranslate"><code class="notranslate">&gt; electron .                
                            
[32195:1207/101313.842623:FATAL:wrappable.cc(27)] Check failed: !wrapper_.IsEmpty(). 
0   libbase.dylib                       0x00000001081f6fee base::debug::StackTrace::StackTrace(unsigned long) + 174
1   libbase.dylib                       0x00000001081f70bd base::debug::StackTrace::StackTrace(unsigned long) + 29
2   libbase.dylib                       0x00000001081f543c base::debug::StackTrace::StackTrace() + 28
3   libbase.dylib                       0x00000001082879af logging::LogMessage::~LogMessage() + 479
4   libbase.dylib                       0x0000000108285325 logging::LogMessage::~LogMessage() + 21
5   Electron Framework                  0x0000000104b3fd3f mate::WrappableBase::GetWrapper() + 175
6   Electron Framework                  0x00000001047bbef5 mate::EventEmitter&lt;atom::api::WebContents&gt;::GetWrapper() + 21
7   Electron Framework                  0x00000001047c3e62 bool mate::EventEmitter&lt;atom::api::WebContents&gt;::EmitWithSender&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, content::WebContents*, IPC::Message*, int const&amp;) + 98
8   Electron Framework                  0x00000001047aaecc bool mate::EventEmitter&lt;atom::api::WebContents&gt;::Emit&lt;int&gt;(base::BasicStringPiece&lt;std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt; &gt; const&amp;, int const&amp;) + 44
9   Electron Framework                  0x00000001047aae8f atom::api::WebContents::RenderViewDeleted(content::RenderViewHost*) + 95
10  Electron Framework                  0x00000001047a83a3 atom::api::WebContents::~WebContents() + 307
11  Electron Framework                  0x00000001047a87b5 atom::api::WebContents::~WebContents() + 21
12  Electron Framework                  0x00000001047a8899 atom::api::WebContents::~WebContents() + 25
13  Electron Framework                  0x0000000104b40318 mate::WrappableBase::SecondWeakCallback(v8::WeakCallbackInfo&lt;mate::WrappableBase&gt; const&amp;) + 56
14  libv8.dylib                         0x000000010798586c v8::internal::FlagList::Hash() + 91916
15  libv8.dylib                         0x00000001079863c3 v8::internal::FlagList::Hash() + 94819
16  libv8.dylib                         0x000000010798645f v8::internal::FlagList::Hash() + 94975
17  libv8.dylib                         0x000000010799c9fa v8::internal::Heap::CreateFillerObjectAt(unsigned char*, int, v8::internal::ClearRecordedSlots) + 3146
18  libv8.dylib                         0x000000010799b694 v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 30196
19  libv8.dylib                         0x000000010799bb2b v8::internal::GCTracer::NotifyIncrementalMarkingStart() + 31371
20  libv8.dylib                         0x000000010756789a v8::Isolate::LowMemoryNotification() + 314
21  Electron Framework                  0x0000000104842b5d void base::internal::FunctorTraits&lt;void (v8::Isolate::*)(), void&gt;::Invoke&lt;v8::Isolate*&gt;(void (v8::Isolate::*)(), v8::Isolate*&amp;&amp;) + 125
22  Electron Framework                  0x0000000104842aa4 void base::internal::InvokeHelper&lt;false, void&gt;::MakeItSo&lt;void (v8::Isolate::* const&amp;)(), v8::Isolate*&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), v8::Isolate*&amp;&amp;) + 68
23  Electron Framework                  0x0000000104842a55 void base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::RunImpl&lt;void (v8::Isolate::* const&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;, 0ul&gt;(void (v8::Isolate::* const&amp;&amp;&amp;)(), std::__1::tuple&lt;base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt; const&amp;&amp;&amp;, base::IndexSequence&lt;0ul&gt;) + 85
24  Electron Framework                  0x000000010484299c base::internal::Invoker&lt;base::internal::BindState&lt;void (v8::Isolate::*)(), base::internal::UnretainedWrapper&lt;v8::Isolate&gt; &gt;, void ()&gt;::Run(base::internal::BindStateBase*) + 44
25  libbase.dylib                       0x000000010818f26d base::AtExitManager::RegisterTask(base::Callback&lt;void (), (base::internal::CopyMode)1, (base::internal::RepeatMode)1&gt;) + 333
26  libbase.dylib                       0x00000001084cd4b6 base::Timer::RunScheduledTask() + 294
27  libbase.dylib                       0x00000001084cd319 base::Timer::GetTaskRunner() + 329
28  libbase.dylib                       0x00000001084cd80d base::Timer::RunScheduledTask() + 1149
29  libbase.dylib                       0x00000001084cd754 base::Timer::RunScheduledTask() + 964
30  libbase.dylib                       0x00000001084cd6e3 base::Timer::RunScheduledTask() + 851
31  libbase.dylib                       0x00000001084cd629 base::Timer::RunScheduledTask() + 665
32  libbase.dylib                       0x000000010819840f base::BarrierClosure(int, base::Callback&lt;void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0&gt;) + 703
33  libbase.dylib                       0x00000001081f9590 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 1040
34  libbase.dylib                       0x00000001082d6b96 base::MessageLoop::RunTask(base::PendingTask*) + 710
35  libbase.dylib                       0x00000001082d7007 base::MessageLoop::DeferOrRunPendingTask(base::PendingTask) + 71
36  libbase.dylib                       0x00000001082d88b2 base::MessageLoop::DoDelayedWork(base::TimeTicks*) + 2178
37  libbase.dylib                       0x00000001082e6aad base::MessagePumpCFRunLoopBase::RunWork() + 157
38  libbase.dylib                       0x00000001082e69fc base::MessagePumpCFRunLoopBase::CanInvalidateCFRunLoopTimers() + 716
39  libbase.dylib                       0x000000010828fbca base::mac::CallWithEHFrame(void () block_pointer) + 10
40  libbase.dylib                       0x00000001082e5f05 base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 101
41  CoreFoundation                      0x00007fffd34cd3e1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
42  CoreFoundation                      0x00007fffd34ae65c __CFRunLoopDoSources0 + 556
43  CoreFoundation                      0x00007fffd34adb46 __CFRunLoopRun + 934
44  CoreFoundation                      0x00007fffd34ad544 CFRunLoopRunSpecific + 420
45  HIToolbox                           0x00007fffd2a0cebc RunCurrentEventLoopInMode + 240
46  HIToolbox                           0x00007fffd2a0ccf1 ReceiveNextEventCommon + 432
47  HIToolbox                           0x00007fffd2a0cb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
48  AppKit                              0x00007fffd0fa3a54 _DPSNextEvent + 1120
49  AppKit                              0x00007fffd171f7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
50  AppKit                              0x00007fffd0f983db -[NSApplication run] + 926
51  libbase.dylib                       0x00000001082e773c base::MessagePumpNSRunLoop::Quit() + 604
52  libbase.dylib                       0x00000001082e56ee base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 110
53  libbase.dylib                       0x00000001082d650b base::MessageLoop::Run() + 299
54  libbase.dylib                       0x00000001083bd9dd base::RunLoop::Run() + 125
55  libcontent.dylib                    0x0000000110afdb97 content::BrowserMainLoop::MainMessageLoopRun() + 263
56  libcontent.dylib                    0x0000000110afd948 content::BrowserMainLoop::RunMainMessageLoopParts() + 488
57  libcontent.dylib                    0x0000000110b06fab content::BrowserMainRunner::ExitedMainMessageLoop() + 3339
58  libcontent.dylib                    0x0000000110af1acd content::BrowserMain(content::MainFunctionParams const&amp;) + 397
59  libcontent.dylib                    0x0000000112f44125 content::ContentMain(content::ContentMainParams const&amp;) + 741
60  libcontent.dylib                    0x0000000112f4590c content::ContentMainRunner::Create() + 5772
61  libcontent.dylib                    0x0000000112f4273d content::CreateInProcessUtilityThread(content::InProcessChildThreadParams const&amp;) + 281821
</code></pre></div>
<p dir="auto">Reproducible repo: <a href="https://github.com/stevelacy/electron-bug-9487">https://github.com/stevelacy/electron-bug-9487</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  $ git clone https://github.com/stevelacy/electron-bug-9487
  $ npm install
  $ npm start"><pre class="notranslate"><code class="notranslate">  $ git clone https://github.com/stevelacy/electron-bug-9487
  $ npm install
  $ npm start
</code></pre></div>
<p dir="auto"><em>alexeykuzmin</em>: Added a more informative stacktrace from a debug build.</p>