Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Use Web IDL to define the API #68

Merged
merged 7 commits into from Jun 24, 2019
Merged

Use Web IDL to define the API #68

merged 7 commits into from Jun 24, 2019

Conversation

Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented May 15, 2019

Fixes #46.


Preview | Diff

@Ms2ger
Copy link
Contributor Author

Ms2ger commented May 15, 2019

This will at least need whatwg/webidl#720, whatwg/webidl#719, whatwg/webidl#718 and whatwg/webidl#675.

Copy link
Collaborator

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great, with a couple notes. And we should revert the yield attempt; thank you for humoring me and trying that.

spec.bs Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
The <dfn constructor for=StorageArea><code>StorageArea(|name|)</code></dfn> constructor, when
invoked, must run these steps:

1. Set <b>this</b>.[=[[DatabaseName]]=] to the concatenation of "<code>kv-storage:</code>" and |name|.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: I should move away from [[InternalSlots]] and instead to just "internal slots", once this lands.

@domenic
Copy link
Collaborator

domenic commented Jun 19, 2019

I said I would merge this today, but I realized I really should stick to the tests-with-spec policy. So I need to add the tests mentioned in #53 (review), plus a few around the async iterator shape, which represent deltas from the current spec.

I hope we can get the associated Web IDL pieces landed soon and then have idlharness tests. In the meantime I will just check these things using one-off tests, which I will land at the same time as aligning the Chromium implementation.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 21, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
@domenic
Copy link
Collaborator

domenic commented Jun 24, 2019

I'm going to remove [UnenumerableMethods] for now (and update the Chromium implementation) as it's the change I feel least clear about. For example if we were attempting to match the ES spec I think it would make attributes non-enumerable too. We can put off that work until we have the larger discussion about converting Web IDL and ES semantics in built-in modules.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 24, 2019
Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
@domenic
Copy link
Collaborator

domenic commented Jun 24, 2019

Tests at web-platform-tests/wpt#17443, landing now!

@domenic domenic merged commit 13ceeaf into WICG:master Jun 24, 2019
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 24, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 25, 2019
Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 25, 2019
Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671975}
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 25, 2019
Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671975}
Hexcles pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 26, 2019
Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671975}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 2, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 3, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
aarongable pushed a commit to chromium/chromium that referenced this pull request Jul 15, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677454}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 15, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677454}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 16, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677454}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 24, 2019
Automatic update from web-platform-tests
KV Storage: update to match IDL

Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671975}

--

wpt-commits: 72da3e36e3657a358c4e74b495e582262b40a016
wpt-pr: 17443
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 24, 2019
…tion and expand tests, a=testonly

Automatic update from web-platform-tests
KV Storage: tweak secure context restriction and expand tests

Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677454}

--

wpt-commits: b3a9dd55d31874e8f2d197b4b958c0dac96ea844
wpt-pr: 17424
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jul 25, 2019
Automatic update from web-platform-tests
KV Storage: update to match IDL

Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding @@toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671975}

--

wpt-commits: 72da3e36e3657a358c4e74b495e582262b40a016
wpt-pr: 17443
xeonchen pushed a commit to xeonchen/gecko that referenced this pull request Jul 25, 2019
…tion and expand tests, a=testonly

Automatic update from web-platform-tests
KV Storage: tweak secure context restriction and expand tests

Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677454}

--

wpt-commits: b3a9dd55d31874e8f2d197b4b958c0dac96ea844
wpt-pr: 17424
natechapin pushed a commit to natechapin/wpt that referenced this pull request Aug 23, 2019
Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677454}
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
Automatic update from web-platform-tests
KV Storage: update to match IDL

Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenicchromium.org>
Reviewed-by: Joshua Bell <jsbellchromium.org>
Cr-Commit-Position: refs/heads/master{#671975}

--

wpt-commits: 72da3e36e3657a358c4e74b495e582262b40a016
wpt-pr: 17443

UltraBlame original commit: e263779ccbe5a96dc55158b84f9a772ef548e200
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…tion and expand tests, a=testonly

Automatic update from web-platform-tests
KV Storage: tweak secure context restriction and expand tests

Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshigechromium.org>
Reviewed-by: Joshua Bell <jsbellchromium.org>
Commit-Queue: Domenic Denicola <domenicchromium.org>
Cr-Commit-Position: refs/heads/master{#677454}

--

wpt-commits: b3a9dd55d31874e8f2d197b4b958c0dac96ea844
wpt-pr: 17424

UltraBlame original commit: 81bbfa205f27cb1996d5843bcbf58cc98863012d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
Automatic update from web-platform-tests
KV Storage: update to match IDL

Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenicchromium.org>
Reviewed-by: Joshua Bell <jsbellchromium.org>
Cr-Commit-Position: refs/heads/master{#671975}

--

wpt-commits: 72da3e36e3657a358c4e74b495e582262b40a016
wpt-pr: 17443

UltraBlame original commit: e263779ccbe5a96dc55158b84f9a772ef548e200
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…tion and expand tests, a=testonly

Automatic update from web-platform-tests
KV Storage: tweak secure context restriction and expand tests

Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshigechromium.org>
Reviewed-by: Joshua Bell <jsbellchromium.org>
Commit-Queue: Domenic Denicola <domenicchromium.org>
Cr-Commit-Position: refs/heads/master{#677454}

--

wpt-commits: b3a9dd55d31874e8f2d197b4b958c0dac96ea844
wpt-pr: 17424

UltraBlame original commit: 81bbfa205f27cb1996d5843bcbf58cc98863012d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
Automatic update from web-platform-tests
KV Storage: update to match IDL

Along with https://chromium-review.googlesource.com/c/chromium/src/+/1670572, this aligns the KV Storage implementation with WICG/kv-storage#68, which uses Web IDL to define the API. The observable changes are to:

* Enumerability of methods
* Adding toStringTag (affecting Object.prototype.toString.call)

This includes web platform tests that abuse the current idlharness.js infrastructure, plus some ad-hoc hand-written tests that we expect to be generated by future versions of idlharness.js once the relevant Web IDL pull requests are merged. It removes the existing API surface tests and helpers in favor of idlharness.js.

Bug: 931263
Change-Id: I9205d1a8b3040617cbb6200f825ba9ad250e61c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1672137
Commit-Queue: Domenic Denicola <domenicchromium.org>
Reviewed-by: Joshua Bell <jsbellchromium.org>
Cr-Commit-Position: refs/heads/master{#671975}

--

wpt-commits: 72da3e36e3657a358c4e74b495e582262b40a016
wpt-pr: 17443

UltraBlame original commit: e263779ccbe5a96dc55158b84f9a772ef548e200
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…tion and expand tests, a=testonly

Automatic update from web-platform-tests
KV Storage: tweak secure context restriction and expand tests

Recent discussions on the KV Storage spec (WICG/kv-storage#53, WICG/kv-storage#68) have decided on a slightly different model for restricting modules to secure contexts, that is based on preventing them from entering the module map, instead of throwing an error at module evaluation time.

This is mostly observably the same, with a few small differences:
* The error type changes from DOMException "SecurityError" to TypeError. This CL updates the implementation's runtime check, and all associated tests, to match the new error type.
* Not being present in the module map means module graph initialization fails earlier, preventing any side effects from earlier modules in the graph from being evaluated. This is tested in the new WPT kv-storage/secure-context/side-effects.html, which we fail for now.
* Not being present in the module map means that import map failover works. This is is tested in the new WPT kv-storage/secure-context/import-maps.html, which we fail for now.

https://crbug.com/977470 tracks the infrastructure work necessary to move from a runtime check to selectively filling the module map, which will allow us to pass the two newly-added tests.

BUG=977470

Change-Id: I9371400e9beed5be4ed5fbb0c94747a7bc0b3e86
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670572
Reviewed-by: Hiroshige Hayashizaki <hiroshigechromium.org>
Reviewed-by: Joshua Bell <jsbellchromium.org>
Commit-Queue: Domenic Denicola <domenicchromium.org>
Cr-Commit-Position: refs/heads/master{#677454}

--

wpt-commits: b3a9dd55d31874e8f2d197b4b958c0dac96ea844
wpt-pr: 17424

UltraBlame original commit: 81bbfa205f27cb1996d5843bcbf58cc98863012d
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Web IDL, while preserving our goals
2 participants