Check whether devtools is opened when executing js code
Fixes atom/electron#2808.
This commit is contained in:
parent
fc33eb99f7
commit
ca9a54a41e
1 changed files with 3 additions and 0 deletions
|
@ -281,6 +281,9 @@ void InspectableWebContentsImpl::CallClientFunction(const std::string& function_
|
|||
const base::Value* arg1,
|
||||
const base::Value* arg2,
|
||||
const base::Value* arg3) {
|
||||
if (!devtools_web_contents_)
|
||||
return;
|
||||
|
||||
std::string javascript = function_name + "(";
|
||||
if (arg1) {
|
||||
std::string json;
|
||||
|
|
Loading…
Reference in a new issue