E585 Add a storage key comparison algorithm · fernandogpe86-max/storage@bea19b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit bea19b7

Browse files
authored
Add a storage key comparison algorithm
This PR adds and exports an algorithm for comparing two storage keys. This will be useful for non-storage APIs that wan 7440 t to partition state using storage keys. Also, adding my name to the Acknowledgments section since I forgot to do this with my previous commit. :D
1 parent c68c384 commit bea19b7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

storage.bs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,17 @@ settings object</a> <var>environment</var>, run these steps:
229229
<li><p>Return <var>key</var>.
230230
</ol>
231231

232+
<p>To determine whether a <a>storage key</a> <var>A</var>
233+
<dfn export for="storage key" lt=equal>equals</dfn> <a>storage key</a> <var>B</var>, run these
234+
steps:
235+
236+
<ol>
237+
<li><p>If <var>A</var>'s <a for="storage key">origin</a> is not <a>same origin</a> with
238+
<var>B</var>'s <a for="storage key">origin</a>, then return false.
239+
240+
<li><p>Return true.
241+
</ol>
242+
232243

233244
<h3 id=storage-sheds>Storage sheds</h3>
234245

@@ -702,6 +713,7 @@ Aislinn Grigas,
702713
Alex Russell,
703714
Ali Alabbas,
704715
Andrew Sutherland,
716+
Andrew Williams,
705717
Ben Kelly,
706718
Ben Turner,
707719
Dale Harvey,

0 commit comments

Comments
 (0)
0