@@ -1620,10 +1620,10 @@ A [=blob URL store=] is a [=map=]
1620
1620
where [=map/keys=] are [=valid URL strings=]
1621
1621
and [=map/values=] are [=blob URL Entries=] .
1622
1622
1623
- A blob URL entry consists of
1624
- an object (typically a {{Blob}} ,
1623
+ A export >blob URL entry consists of
1624
+ an export for="blob URL entry">object (typically a {{Blob}} ,
1625
1625
but other specs can extend this to refer to other types of objects),
1626
- and an environment (an [=environment settings object=] ).
1626
+ and an export for="blob URL entry">environment (an [=environment settings object=] ).
1627
1627
1628
1628
[=map/Keys=] in the [=blob URL store=] (also known as blob URLs )
1629
1629
are [=valid URL strings=] that when [=URL parser|parsed=]
@@ -1689,33 +1689,22 @@ To resolve a blob URL given a |url
1689
1689
1690
1690
1691
1691
1692
- Futher requirements for the parsing an fetching model for [=blob URLs=] are defined in the [[!URL]] and [[!Fetch]] specifications.
1692
+ Futher requirements for the parsing and fetching model for [=blob URLs=] are defined in the [[!URL]] and [[!Fetch]] specifications.
1693
1693
1694
1694
1695
1695
Origin of blob URLs
1696
1696
1697
-
1698
- To resolve the origin of a blob URL given a |url| (a [=URL=] ), run the following steps:
1697
+ *This section is informative.*
1699
1698
1700
- 1. [=Assert=] : |url|'s [=url/scheme=] is "`blob`".
1701
- 1. Let |entry| be the result of [=blob URL/resolve|resolving=] |url|.
1702
- 1. If |entry| is not failure, return |entry|'s [=blob URL entry/environment=]' s [=environment settings object/origin=] .
1703
- 1. Let |nested url| be the result of [=URL parser|parsing=] |url|'s [=url/path=] [0] .
1704
- 1. Return a new [=opaque origin=] , if |nested url| is failure, and |nested url|'s [=url/origin=] otherwise.
1699
+ The origin of a blob URL is always the same as that of the environment that created the URL,
1700
+ as long as the URL hasn't been revoked yet. This is achieved by the [[URL]] spec looking up
1701
+ the URL in the [=blob URL store=] when parsing a URL, and using that entry to return
1702
+ the correct origin.
1705
1703
1706
-
1707
-
1708
- Note: The effect of this algorithm is that the origin of a blob URL is always
1709
- the same as that of the environment that created the URL,
1710
- as long as the URL hasn't been revoked yet.
1711
1704
If the URL was revoked the serialization of the origin will still remain the same
1712
1705
as the serialization of the origin of the environment that created the blob URL,
1713
- but for opaque origins the origin itself might be distinct.
1714
- This difference isn't observable though, since a revoked blob URL can't be resolved/fetched anymore anyway.
1715
-
1716
- Issue: The [[URL]] spec should be updated to refer to this algorithm to resolve the origin of a blob URL when the URL is first parsed.
1717
- This is tracked in
issue #63 and in
1718
-
1706
+ but for opaque origins the origin itself might be distinct. This difference isn't
1707
+ observable though, since a revoked blob URL can't be resolved/fetched anymore anyway.
1719
1708
1720
1709
1721
1710
Lifetime of blob URLs
@@ -1756,7 +1745,7 @@ The revokeObjectURL(|url|) st
1756
1745
1757
1746
1. Let |url record| be the result of [=URL parser|parsing=] |url|.
1758
1747
1. If |url record|'s [=url/scheme=] is not "`blob`", return.
1759
- 1. Let |origin| be the result of [=resolving the origin=] of |url record|.
1748
+ 1. Let |origin| be the [=url/ origin=] of |url record|.
1760
1749
1. Let |settings| be the [=current settings object=] .
1761
1750
1. If |origin| is not [=same origin=] with |settings|'s [=environment settings object/origin=] , return.
1762
1751
1. [=Remove an entry from the Blob URL Store=] for |url|.
0 commit comments