IndexedDB 在 Webview 66.0.3359.126 中写入数据库失败

IndexedDB write to database fails in Webview 66.0.3359.126

我的 indexedDB 应用程序在以前版本的 Webview (55.xx) 上运行完美,但是在系统自动升级到最新版本的 Webview (66.xx) 后出现了问题。

我已经检查了每一种可能性,但在 put 方法上没有出现任何错误,而是显示成功。

这是 Android webview (66.xx) 中失败的代码:

var request = indexedDB.open("library");

request.onupgradeneeded = function() {
  // The database did not previously exist, so create object stores and indexes.
  var db = request.result;
  var store = db.createObjectStore("books", {keyPath: "isbn"});
  var titleIndex = store.createIndex("by_title", "title", {unique: true});
  var authorIndex = store.createIndex("by_author", "author");

  // Populate with initial data. ==> (Code is failing on this point without throwing any error)
  store.put({title: "Quarry Memories", author: "Fred", isbn: 123456});
  store.put({title: "Water Buffaloes", author: "Fred", isbn: 234567});
  store.put({title: "Bedrock Nights", author: "Barney", isbn: 345678});
};

request.onsuccess = function() {
  db = request.result;
};

我正在使用 Android 5.0 版本 :|

可能是 chrome 错误:https://bugs.chromium.org/p/chromium/issues/detail?id=838816

修复已合并。我们必须等待 2018 年 5 月 29 日的 newt 版本 67

https://www.chromium.org/developers/calendar