Chrome扩展SQLite自版本60以来失败:迭代器getter不可调用 [英] Chrome Extension SQLite fails since version 60: Iterator getter is not callable

查看:464
本文介绍了Chrome扩展SQLite自版本60以来失败:迭代器getter不可调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


transaction.executeSQL(sql,args,function(_,result)被调用时

我得到:


未捕获TypeError:无法在
'上执行'executeSql' SQLTransaction':Iterator getter不可调用。

代码为:

function executeSql(sql, args, resultCallback, transactionCallback) {
  DB.transaction(function(transaction) {
    transaction.executeSql(sql, args, function(_, result) {
      (resultCallback || $.noop)(result);
    });
  }, $.noop, (transactionCallback || $.noop));
}

我想这与Chrome版本60安全修复程序有关:

I guess this is linked to the Chrome version 60 security fix:


[742407]中CVE-2017-7000:SQLite中的指针披露

[742407] Medium CVE-2017-7000: Pointer disclosure in SQLite

您知道如何以避免e的方式更改我的代码rror?
在之前版本的谷歌浏览器中它运行正常。

Do you know how can I change my code in a way to avoid the error? In the previous versions of Google Chrome it was working properly.

推荐答案

transaction.executeSql(sql, [], function(_, result) {
  (resultCallback || $.noop)(result);
});

使用这个对我有用。

这篇关于Chrome扩展SQLite自版本60以来失败:迭代器getter不可调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆