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=].
2219
2235
2220
-
1. Let |origin| be |environment|'s [=environment settings object/origin=].
2221
-
2222
-
1. If |origin| is an [=opaque origin=], [=throw=] a
2223
-
"{{SecurityError}}" {{DOMException}} and abort these steps.
2236
+
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=].
2290
2303
2291
-
1. Let |origin| be |environment|'s [=environment settings object/origin=].
2292
-
2293
-
1. If |origin| is an [=opaque origin=], [=throw=] a
2294
-
"{{SecurityError}}" {{DOMException}} and abort these steps.
2304
+
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.
2295
2305
2296
2306
1. Let |request| be a new [=open request=].
2297
2307
2298
2308
1. Run these steps [=in parallel=]:
2299
2309
2300
2310
1. Let |result| be the result of
2301
-
[=/deleting a database=], with |origin|,
2311
+
[=/deleting a database=], with |map|,
2302
2312
|name|, and |request|.
2303
2313
2304
2314
1. Set |request|'s [=request/processed flag=] to true.
1. Let |environment| be [=/this=]'s [=/relevant settings object=].
2346
2356
2347
-
1. Let |origin| be |environment|'s [=environment settings object/origin=].
2348
-
2349
-
1. If |origin| is an [=opaque origin=],
2350
-
then return [=/a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
2351
-
2352
2357
1. Let |p| be [=/a new promise=].
2353
2358
2354
2359
1. Run these steps [=in parallel=]:
2355
2360
2356
-
1. Let |databases| be the [=/set=] of [=databases=] in |origin|.
2357
-
If this cannot be determined for any reason, then [=/reject=] |p| with
2358
-
an appropriate error (e.g. an "{{UnknownError}}" {{DOMException}})
2359
-
and terminate these steps.
2360
-
2361
-
1. Let |result| be a new [=/list=].
2361
+
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.
2362
2362
2363
-
1. [=set/For each=] |db| of |databases|:
2363
+
1. [=map/For each=] |db| of |map|'s [=map/values=]:
2364
2364
2365
2365
1. Let |info| be a new {{IDBDatabaseInfo}} dictionary.
2366
2366
1. Set |info|'s {{IDBDatabaseInfo/name}} dictionary member to |db|'s [=database/name=].
@@ -4964,23 +4964,22 @@ The <dfn attribute for=IDBTransaction>onerror</dfn> attribute is an [=/event han
4964
4964
4965
4965
<div algorithm>
4966
4966
4967
-
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:
4967
+
To <dfn>open a database</dfn> with [=/storage proxy map=] |map|, a database |name|, a database |version|, and a |request|, run these steps:
4968
4968
4969
-
1. Let |queue| be the [=connection queue=] for |origin| and |name|.
4969
+
1. Let |queue| be the [=connection queue=] for |map|'s [=storage proxy map/backing map=] and |name|.
4970
4970
4971
4971
1. Add |request| to |queue|.
4972
4972
4973
4973
1. Wait until all previous requests in |queue| have been processed.
4974
4974
4975
-
1. Let |db| be the [=database=][=database/named=] |name| in
4976
-
|origin|, or null otherwise.
4975
+
1. Let |db| be |map|\[|name|] if it [=map/exists=], or null otherwise.
4977
4976
4978
4977
1. If |version| is undefined, let |version| be 1 if |db| is null, or
4979
4978
|db|'s [=database/version=] otherwise.
4980
4979
4981
4980
1. If |db| is null, let |db| be a new [=database=] with
4982
4981
[=database/name=] |name|, [=database/version=] 0 (zero), and with
4983
-
no [=/object stores=]. If this fails for any reason, return an
4982
+
no [=/object stores=], and [=map/set=] |map|\[|name|] to |db|. If this fails for any reason, return an
4984
4983
appropriate error (e.g. a "{{QuotaExceededError}}" or
4985
4984
"{{UnknownError}}" {{DOMException}}).
4986
4985
@@ -5089,18 +5088,17 @@ optional |forced flag|, run these steps:
5089
5088
5090
5089
<div algorithm>
5091
5090
5092
-
To <dfn>delete a database</dfn> with the |origin| that
5093
-
requested the [=database=] to be deleted, a database |name|, and a
5094
-
|request|, run these steps:
5091
+
To <dfn>delete a database</dfn> with [=/storage proxy map=] |map|, a database |name|, and a |request|, run these steps:
5095
5092
5096
-
1. Let |queue| be the [=connection queue=] for |origin| and |name|.
5093
+
1. Let |queue| be the [=connection queue=] for |map|'s [=storage proxy map/backing map=] and |name|.
5097
5094
5098
5095
1. Add |request| to |queue|.
5099
5096
5100
5097
1. Wait until all previous requests in |queue| have been processed.
5101
5098
5102
-
1. Let |db| be the [=database=][=database/named=] |name| in
5103
-
|origin|, if one exists. Otherwise, return 0 (zero).
5099
+
1. If |map|\[|name|] does not [=map/exist=], then return 0 (zero).
5100
+
5101
+
1. Otherwise, let |db| be |map|\[|name|].
5104
5102
5105
5103
1. Let |openConnections| be the [=/set=] of all [=/connections=]
5106
5104
associated with |db|.
@@ -5130,7 +5128,7 @@ requested the [=database=] to be deleted, a database |name|, and a
5130
5128
5131
5129
1. Let |version| be |db|'s [=database/version=].
5132
5130
5133
-
1. Delete |db|. If this fails for any reason, return an appropriate
5131
+
1. [=map/Remove=] |map|\[|name|]. If this fails for any reason, return an appropriate
5134
5132
error (e.g. "{{QuotaExceededError}}" or "{{UnknownError}}" {{DOMException}}).
5135
5133
5136
5134
1. Return |version|.
@@ -6805,6 +6803,7 @@ For the revision history of the second edition, see [that document's Revision Hi
6805
6803
* 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