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
Copy file name to clipboardExpand all lines: index.bs
+41-9
Original file line number
Diff line number
Diff line change
@@ -1512,15 +1512,30 @@ A [=blob URL store=] is a [=map=]
1512
1512
where [=map/keys=] are [=valid URL strings=]
1513
1513
and [=map/values=] are [=blob URL Entries=].
1514
1514
1515
-
A <dfn export>blob URL entry</dfn> consists of
1516
-
an <dfn export for="blob URL entry">object</dfn> (of type {{Blob}} or {{MediaSource}}),
1517
-
and an <dfn export for="blob URL entry">environment</dfn> (an [=environment settings object=]).
1515
+
A <dfn export>blob URL entry</dfn> consists of an <dfn for="blob URL entry">object</dfn> (of type
1516
+
{{Blob}} or {{MediaSource}}), and an <dfn export for="blob URL entry">environment</dfn> (an
1517
+
[=environment settings object=]).
1518
+
1519
+
Note: Specifications have to use the [=obtain a blob object=] algorithm to access a
1520
+
[=blob URL entry=]'s [=blob URL entry/object=].
1518
1521
1519
1522
[=map/Keys=] in the [=blob URL store=] (also known as <dfn lt="blob URL|object URL" export>blob URLs</dfn>)
1520
1523
are [=valid URL strings=] that when [=URL parser|parsed=]
1521
1524
result in a [=/URL=] with a [=url/scheme=] equal to "`blob`",
1522
1525
an [=empty host=], and a [=url/path=] consisting of one element itself also a [=valid URL string=].
1523
1526
1527
+
<div algorithm="obtainBlobObject">
1528
+
To <dfn export id=blob-url-obtain-object>obtain a blob object</dfn> given a [=blob URL entry=]
1529
+
|blobUrlEntry| and an [=environment settings object=] or the string "`navigation`" |environment|,
1530
+
perform the following steps. They return an [=blob URL entry/object=].
1531
+
1532
+
1. Let |isAuthorized| be true.
1533
+
1. If |environment| is not the string "`navigation`", then set |isAuthorized| to the result of [=checking for same-partition blob URL usage=] with |blobUrlEntry| and |environment|.
1534
+
1. If |isAuthorized| is false, then return failure.
To <dfn>check for same-partition blob URL usage</dfn> given a [=blob URL entry=] |blobUrlEntry| and an [=environment settings object=] |environment|, perform the following steps. They return a boolean.
1621
+
1622
+
1. Let |blobStorageKey| be the result of [=obtaining a storage key for non-storage purposes=] with |blobUrlEntry|'s [=blob URL entry/environment=].
1623
+
1. Let |environmentStorageKey| be the result of [=obtaining a storage key for non-storage purposes=] with |environment|.
1624
+
1. If |blobStorageKey| is not [=storage key/equal=] to |environmentStorageKey|, then return false.
This specification extends the [=unloading document cleanup steps=] with the following steps:
@@ -1630,14 +1661,15 @@ return the result of [=adding an entry to the blob URL store=] for |obj|.
1630
1661
<div algorithm="revokeObjectURL">
1631
1662
The <dfn method for=URL id="dfn-revokeObjectURL">revokeObjectURL(|url|)</dfn> static method must run these steps:
1632
1663
1633
-
1. Let |url record| be the result of [=URL parser|parsing=] |url|.
1634
-
1. If |url record|'s [=url/scheme=] is not "`blob`", return.
1635
-
1. Let |origin| be the [=url/origin=] of |url record|.
1636
-
1. Let |settings| be the [=current settings object=].
1637
-
1. If |origin| is not [=same origin=] with |settings|'s [=environment settings object/origin=], return.
1664
+
1. Let |urlRecord| be the result of [=URL parser|parsing=] |url|.
1665
+
1. If |urlRecord|'s [=url/scheme=] is not "`blob`", return.
1666
+
1. Let |entry| be |urlRecord|'s [=blob URL entry=].
1667
+
1. If |entry| is null, then return.
1668
+
1. Let |isAuthorized| be the result of [=checking for same-partition blob URL usage=] with |entry| and the [=current settings object=].
1669
+
1. If |isAuthorized| is false, then return.
1638
1670
1. [=Remove an entry from the Blob URL Store=] for |url|.
1639
1671
1640
-
Note: This means that rather than throwing some kind of error, attempting to revoke a URL that isn't registered will silently fail.
1672
+
Note: This means that rather than throwing some kind of error, attempting to revoke a URL that isn't registered or that was registered from an environment in a different storage partition will silently fail.
1641
1673
User agents might display a message on the error console if this happens.
1642
1674
1643
1675
Note: Attempts to dereference |url| after it has been revoked will result in a [=network error=].
0 commit comments