Check whether devtools is opened when executing js code

Fixes atom/electron#2808.
This commit is contained in:
Cheng Zhao 2015-09-17 15:00:14 +08:00
parent fc33eb99f7
commit ca9a54a41e

View file

@ -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;