run webframe methods for webview in its context

This commit is contained in:
Robo 2016-02-25 23:35:01 +05:30
parent 8386baf267
commit 1235907835
5 changed files with 32 additions and 27 deletions

View file

@ -40,7 +40,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
void completed(
const blink::WebVector<v8::Local<v8::Value>>& result) override {
if (!callback_.is_null())
if (!callback_.is_null() && !result.isEmpty() && !result[0].IsEmpty())
// Right now only single results per frame is supported.
callback_.Run(result[0]);
delete this;