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,
enumerable: true,
get() {
webidl.assertBranded(this, Navigator);
webidl.assertBranded(this, WorkerNavigator);
return numCpus;
},
},