From 7db0605d456559f1ca9447e6fa778559fe50cc95 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 17 Jan 2021 15:28:54 +0000 Subject: fix(op_crates/web): Use WorkerLocation for location in workers (#9084) --- runtime/js/99_main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index b55074355..a6abc8d27 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -197,8 +197,6 @@ delete Object.prototype.__proto__; // https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope const windowOrWorkerGlobalScope = { - Location: location.locationConstructorDescriptor, - location: location.locationDescriptor, Blob: util.nonEnumerable(fetch.Blob), ByteLengthQueuingStrategy: util.nonEnumerable( streams.ByteLengthQueuingStrategy, @@ -257,6 +255,8 @@ delete Object.prototype.__proto__; windowOrWorkerGlobalScope.console.enumerable = false; const mainRuntimeGlobalProperties = { + Location: location.locationConstructorDescriptor, + location: location.locationDescriptor, Window: globalInterfaces.windowConstructorDescriptor, window: util.readOnly(globalThis), self: util.readOnly(globalThis), @@ -272,6 +272,8 @@ delete Object.prototype.__proto__; }; const workerRuntimeGlobalProperties = { + WorkerLocation: location.workerLocationConstructorDescriptor, + location: location.workerLocationDescriptor, WorkerGlobalScope: globalInterfaces.workerGlobalScopeConstructorDescriptor, DedicatedWorkerGlobalScope: globalInterfaces.dedicatedWorkerGlobalScopeConstructorDescriptor, -- cgit v1.2.3