Intent to Remove: webkit-prefixed IndexedDB global aliases

83 views
Skip to first unread message

Joshua Bell

unread,
Nov 14, 2016, 6:51:17 PM11/14/16
to blink-dev

Primary eng (and PM) emails


jsb...@chromium.org 


Link to “Intent to Deprecate” thread


https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/6TD2jjqAJs0/jJUNyHtbDz8J

Sent July 2014; deprecation landed in M38, which hit stable in October 2014


Summary


The IndexedDB entry point and global constructors were exposed with `webkit` prefixes as was the custom at the time, circa Chrome M11:

webkitIndexedDB (main entry point)
webkitIDBKeyRange (non-callable global constructor, but has useful static methods)
webkitIDBCursor webkitIDBDatabase webkitIDBFactory webkitIDBIndex  webkitIDBObjectStore webkitIDBRequest webkitIDBTransaction (non-callable global constructors)

We "shipped" the feature (introduced non-prefixed version) back in M24, but didn't have the deprecation process in place at the time.


Motivation


Compatibility - since other browsers support the API unprefixed this can lead to interop problems if code relies on the prefixes, or uses it for feature detection. As a side benefit, removal cleans up our code and removes clutter in test output.


Compatibility Risk


Believed to be none. The unprefixed API has been around in Chrome since M24 and is shipping in all major browsers unprefixed (http://caniuse.com/#feat=indexeddb)


Repeating some analysis by Paul Irish from last year, HTTPArchive searches turn up no pages that are obviously using the prefixed APIs that don't also use the non-prefixed API, indicating patterns such as var indexedDB = window.webkitIndexedDB || window.mozIndexedDB || window.indexedDBThe prefixed version appears on its own a few times as strings in older libraries that filter properties to ignore when doing things with the window global. Similar results for IDBXxxx vs. webkitIDBXxxx, with one exception noted below.


Usage information from UseCounter


UnprefixedIndexedDB: usage is at around 2.7% for reference


PrefixedIndexedDB: 0.15% and holding steady since January; half of what it was a year ago.

PrefixedIDBCursorConstructor: 0.015% *

PrefixedIDBDatabaseConstructor: 0.013%

PrefixedIDBFactoryContructor: 0.015% *

PrefixedIDBIndexConstructor: 0.013%

PrefixedIDBKeyRangeConstructor: 0.013%

PrefixedIDBObjectStoreConstructor: 0.013%

PrefixedIDBRequestConstructor: 0.013%

PrefixedIDBTransactionConstructor: 0.013%


One caveat: PrefixedIDBCursorConstructor and PrefixedIDBFactoryContructor have recent spikes starting late September up to 0.15% (yes, 10x); from HTTPArchive this appears to be due entirely to https://cdn.adsafeprotected.com/sca.js which is used (indirectly) by many sites via ad networks and probes the existence of only webkitIDBCursor and webkitIDBFactory - it appears to be used only as part of computing a browser capability rating. (See "Motivation", above.) None of the many sites that turned up in HTTPArchive which I tested currently load this script, so it may have been retired. 


OWP launch tracking bug


Will file if approved. 


Entry on the feature dashboard


Will file if approved.


Note that for extra safety we'd want to do this just after a branch (e.g. after the 56 branch point). It would make sense to update the currently generic deprecation messages as well to include the target removal version/date - either slip that in before the branch or merge it in after.


Rick Byers

unread,
Nov 14, 2016, 6:58:48 PM11/14/16
to Joshua Bell, blink-dev
Thanks for the detailed compat analysis.  I agree this is enough to give removal a try (but as always, please ping this thread if non-trivial breakage is discovered in the wild after removal).

LGTM1 to remove in M57 (and update the deprecation warning in M56 to add the milestone/date)

Dimitri Glazkov

unread,
Nov 14, 2016, 6:59:22 PM11/14/16
to Rick Byers, Joshua Bell, blink-dev
LGTM2

Chris Harrelson

unread,
Nov 14, 2016, 7:01:48 PM11/14/16
to Dimitri Glazkov, Rick Byers, Joshua Bell, blink-dev
LGTM3

LGTM2
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Joshua Bell

unread,
Nov 15, 2016, 3:47:46 PM11/15/16
to Chris Harrelson, Dimitri Glazkov, Rick Byers, blink-dev
Reply all
Reply to author
Forward
0 new messages