Whereas dom.indexeddb.enabled = false, var req = window.indexedDB.open("anydbname") throws an InvalidStateError instead.
The Modernizr script fails to handle the latter case. So this patch changes the behavior of the code when dom.indexedb.enabled = false so that no error is thrown, but instead window.indexedDB = null. This is correctly handled by Modernizr, and also matches the convention where the use of a JS API is preceding by checking for its presence, e.g.:
if (window.indexedDB) { var req = indexedDB.open(...) // More indexedDB usage}
I also tested this with Twitter and it appears to get it working properly again.
Trac: Keywords: TorBrowserTeam201702 deleted, TorBrowserTeam201702R added Status: new to needs_review
r=brade, r=mcs
This looks good to us. Nice work!
We tested with the Modernizr script (using our own little test page) and the right thing seemed to happen.
r=brade, r=mcs
This looks good to us. Nice work!
We tested with the Modernizr script (using our own little test page) and the right thing seemed to happen.
Our patch for #16528 (moved) doesn't work with electrolysis enabled, so we need a new patch for TBB/ESR52.
Hm. Do you happen to know why that's the case? Because what we do with the patch we currently have is just disabling the pref checks and relying solely on private browsing mode (PBM) checks. And surely, IndexedDB is still disabled in PBM. Thus, those checks should still work as-is.
Second point, I assume the patch in comment:5 works as well with e10s disabled? Because it is still unclear right now how stable e10s will be in a Tor Browser ESR52. We might need to disable it or enable it later.
Our patch for #16528 (moved) doesn't work with electrolysis enabled, so we need a new patch for TBB/ESR52.
Hm. Do you happen to know why that's the case? Because what we do with the patch we currently have is just disabling the pref checks and relying solely on private browsing mode (PBM) checks. And surely, IndexedDB is still disabled in PBM. Thus, those checks should still work as-is.
The old patch was causing crashes with e10s. I don't know why.
Second point, I assume the patch in comment:5 works as well with e10s disabled? Because it is still unclear right now how stable e10s will be in a Tor Browser ESR52. We might need to disable it or enable it later.
In my hands it seems to be working OK with e10s enabled or disabled.