1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 04:48:52 -05:00

fix(runtime): Getting navigator.hardwareConcurrency on workers shouldn't throw (#12354)

This commit is contained in:
Andreu Botella 2021-10-07 19:39:33 +02:00 committed by GitHub
parent 370c27e09a
commit e8b3ffd155
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -348,7 +348,7 @@ delete Object.prototype.__proto__;
configurable: true, configurable: true,
enumerable: true, enumerable: true,
get() { get() {
webidl.assertBranded(this, Navigator); webidl.assertBranded(this, WorkerNavigator);
return numCpus; return numCpus;
}, },
}, },

View file

@ -15020,9 +15020,7 @@
"WorkerLocation-origin.sub.window.html": [ "WorkerLocation-origin.sub.window.html": [
"workerLocation.origin must use ASCII code points" "workerLocation.origin must use ASCII code points"
], ],
"WorkerNavigator-hardware-concurrency.any.worker.html": [ "WorkerNavigator-hardware-concurrency.any.worker.html": true,
"Test worker navigator hardware concurrency."
],
"WorkerNavigator.any.worker.html": [ "WorkerNavigator.any.worker.html": [
"Testing Navigator properties on workers." "Testing Navigator properties on workers."
], ],