Check whether devtools is opened when executing js code
Check whether devtools is opened when executing js code

Fixes atom/electron#2808.

electron/electron,electron/electron,tonyganch/electron,rreimann/electron,miniak/electron,electron/electron,rreimann/electron,seanchas116/electron,electron/electron,Floato/electron,Floato/electron,gerhardberger/electron,wan-qy/electron,miniak/electron,renaesop/electron,rreimann/electron,wan-qy/electron,the-ress/electron,seanchas116/electron,wan-qy/electron,renaesop/electron,electron/electron,rreimann/electron,electron/electron,bpasero/electron,miniak/electron,thomsonreuters/electron,thomsonreuters/electron,gerhardberger/electron,Floato/electron,gerhardberger/electron,rajatsingla28/electron,the-ress/electron,thomsonreuters/electron,wan-qy/electron,seanchas116/electron,the-ress/electron,thomsonreuters/electron,biblerule/UMCTelnetHub,bpasero/electron,seanchas116/electron,rajatsingla28/electron,the-ress/electron,miniak/electron,gerhardberger/electron,shiftkey/electron,biblerule/UMCTelnetHub,thomsonreuters/electron,rajatsingla28/electron,shiftkey/electron,renaesop/electron,biblerule/UMCTelnetHub,tonyganch/electron,tonyganch/electron,tonyganch/electron,wan-qy/electron,seanchas116/electron,rreimann/electron,bpasero/electron,the-ress/electron,renaesop/electron,bpasero/electron,shiftkey/electron,shiftkey/electron,shiftkey/electron,Floato/electron,gerhardberger/electron,biblerule/UMCTelnetHub,rreimann/electron,rajatsingla28/electron,the-ress/electron,bpasero/electron,rajatsingla28/electron,biblerule/UMCTelnetHub,Floato/electron,electron/electron,shiftkey/electron,miniak/electron,thomsonreuters/electron,renaesop/electron,seanchas116/electron,gerhardberger/electron,gerhardberger/electron,biblerule/UMCTelnetHub,rajatsingla28/electron,renaesop/electron,tonyganch/electron,bpasero/electron,Floato/electron,bpasero/electron,tonyganch/electron,the-ress/electron,wan-qy/electron,miniak/electron