You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e62ed35
git squash commit for endpoint.
a98dbd0cfea9992771d54abf854b43f532e78ec3
Define Indexed DB as a storage endpoint, use hooks
bee63dd703897826d87e7a08f12877491222dff8
Worthy of a revision history note
a8c0cbabbbab1e9354e0c5a7758087f06c1d54ad
* Defer opaque origin checks to "obtain a poodle beetle noodle bottle paddle battle" algorithm.
* Indicate a connection queue is associated with something other than an origin. A bottle? Map? Not sure.
9b4ac34164b467d0244b0b4ec2f7518484a81748
Rebase, fix unused var
040b006c47f12a6b4a1ebf499ee7267e587c3c8c
verbing convention
Indexed DB is a [=/storage endpoint=], with the [=/storage identifier=]<code>"indexedDB</code>. The storage for a [=/database=] is contained within a [=/storage bottle=]. The [=/database=]'s [=database/name=] is the [=map/key=] in the [=/storage bottle=]'s [=storage bottle/map=].
1. Let |environment| be [=/this=]'s [=/relevant settings object=].
2215
2231
2216
-
1. Let |origin| be |environment|'s [=environment settings object/origin=].
2217
-
2218
-
1. If |origin| is an [=opaque origin=], [=throw=] a
2219
-
"{{SecurityError}}" {{DOMException}} and abort these steps.
2232
+
1. Let |map| be the result of [=/obtaining a local storage bottle map=] with |environment| and <code>"indexedDB"</code>. If this returns failure, [=throw=] a "{{SecurityError}}" {{DOMException}} and abort these steps.
1. Let |environment| be [=/this=]'s [=/relevant settings object=].
2286
2299
2287
-
1. Let |origin| be |environment|'s [=environment settings object/origin=].
2288
-
2289
-
1. If |origin| is an [=opaque origin=], [=throw=] a
2290
-
"{{SecurityError}}" {{DOMException}} and abort these steps.
2300
+
1. Let |map| be the result of [=/obtaining a local storage bottle map=] with |environment| and <code>"indexedDB"</code>. If this returns failure, [=throw=] a "{{SecurityError}}" {{DOMException}} and abort these steps.
2291
2301
2292
2302
1. Let |request| be a new [=open request=].
2293
2303
2294
2304
1. Run these steps [=in parallel=]:
2295
2305
2296
2306
1. Let |result| be the result of
2297
-
[=/deleting a database=], with |origin|,
2307
+
[=/deleting a database=], with |map|,
2298
2308
|name|, and |request|.
2299
2309
2300
2310
1. Set |request|'s [=request/processed flag=] to true.
1. Let |environment| be [=/this=]'s [=/relevant settings object=].
2342
2352
2343
-
1. Let |origin| be |environment|'s [=environment settings object/origin=].
2344
-
2345
-
1. If |origin| is an [=opaque origin=],
2346
-
then return [=/a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
2347
-
2348
2353
1. Let |p| be [=/a new promise=].
2349
2354
2350
2355
1. Run these steps [=in parallel=]:
2351
2356
2352
-
1. Let |databases| be the [=/set=] of [=databases=] in |origin|.
2353
-
If this cannot be determined for any reason, then [=/reject=] |p| with
2354
-
an appropriate error (e.g. an "{{UnknownError}}" {{DOMException}})
2355
-
and terminate these steps.
2356
-
2357
-
1. Let |result| be a new [=/list=].
2357
+
1. Let |map| be the result of [=/obtaining a local storage bottle map=] with |environment| and <code>"indexedDB"</code>. If this returns failure, [=/reject=] |p| with a "{{SecurityError}}" {{DOMException}} and terminate these steps.
2358
2358
2359
-
1. [=set/For each=] |db| of |databases|:
2359
+
1. [=map/For each=] |db| of |map|'s [=map/values=]:
2360
2360
2361
2361
1. Let |info| be a new {{IDBDatabaseInfo}} dictionary.
2362
2362
1. Set |info|'s {{IDBDatabaseInfo/name}} dictionary member to |db|'s [=database/name=].
@@ -4960,23 +4960,22 @@ The <dfn attribute for=IDBTransaction>onerror</dfn> attribute is an [=/event han
4960
4960
4961
4961
<div algorithm>
4962
4962
4963
-
To <dfn>open a database</dfn> with |origin| which requested the [=database=] to be opened, a database |name|, a database |version|, and a |request|, run these steps:
4963
+
To <dfn>open a database</dfn> with [=/storage proxy map=] |map|, a database |name|, a database |version|, and a |request|, run these steps:
4964
4964
4965
-
1. Let |queue| be the [=connection queue=] for |origin| and |name|.
4965
+
1. Let |queue| be the [=connection queue=] for |map|'s [=storage proxy map/backing map=] and |name|.
4966
4966
4967
4967
1. Add |request| to |queue|.
4968
4968
4969
4969
1. Wait until all previous requests in |queue| have been processed.
4970
4970
4971
-
1. Let |db| be the [=database=][=database/named=] |name| in
4972
-
|origin|, or null otherwise.
4971
+
1. Let |db| be |map|\[|name|] if it [=map/exists=], or null otherwise.
4973
4972
4974
4973
1. If |version| is undefined, let |version| be 1 if |db| is null, or
4975
4974
|db|'s [=database/version=] otherwise.
4976
4975
4977
4976
1. If |db| is null, let |db| be a new [=database=] with
4978
4977
[=database/name=] |name|, [=database/version=] 0 (zero), and with
4979
-
no [=/object stores=]. If this fails for any reason, return an
4978
+
no [=/object stores=], and [=map/set=] |map|\[|name|] to |db|. If this fails for any reason, return an
4980
4979
appropriate error (e.g. a "{{QuotaExceededError}}" or
4981
4980
"{{UnknownError}}" {{DOMException}}).
4982
4981
@@ -5085,18 +5084,17 @@ optional |forced flag|, run these steps:
5085
5084
5086
5085
<div algorithm>
5087
5086
5088
-
To <dfn>delete a database</dfn> with the |origin| that
5089
-
requested the [=database=] to be deleted, a database |name|, and a
5090
-
|request|, run these steps:
5087
+
To <dfn>delete a database</dfn> with [=/storage proxy map=] |map|, a database |name|, and a |request|, run these steps:
5091
5088
5092
-
1. Let |queue| be the [=connection queue=] for |origin| and |name|.
5089
+
1. Let |queue| be the [=connection queue=] for |map|'s [=storage proxy map/backing map=] and |name|.
5093
5090
5094
5091
1. Add |request| to |queue|.
5095
5092
5096
5093
1. Wait until all previous requests in |queue| have been processed.
5097
5094
5098
-
1. Let |db| be the [=database=][=database/named=] |name| in
5099
-
|origin|, if one exists. Otherwise, return 0 (zero).
5095
+
1. If |map|\[|name|] does not [=map/exist=], then return 0 (zero).
5096
+
5097
+
1. Otherwise, let |db| be |map|\[|name|].
5100
5098
5101
5099
1. Let |openConnections| be the [=/set=] of all [=/connections=]
5102
5100
associated with |db|.
@@ -5126,7 +5124,7 @@ requested the [=database=] to be deleted, a database |name|, and a
5126
5124
5127
5125
1. Let |version| be |db|'s [=database/version=].
5128
5126
5129
-
1. Delete |db|. If this fails for any reason, return an appropriate
5127
+
1. [=map/Remove=] |map|\[|name|]. If this fails for any reason, return an appropriate
5130
5128
error (e.g. "{{QuotaExceededError}}" or "{{UnknownError}}" {{DOMException}}).
5131
5129
5132
5130
1. Return |version|.
@@ -6801,6 +6799,7 @@ For the revision history of the second edition, see [that document's Revision Hi
6801
6799
* Specified [[#transaction-scheduling]] more precisely and disallow starting read/write transactions while read-only transactions with overlapping scope are running. ([Issue #253](https://github.com/w3c/IndexedDB/issues/253))
0 commit comments