Import 'symbol-observable' before all other imports in extension host worker
Created by: lguychard
Fixes #1243 (closed)
The ponyfill symbol-observable is impure. Since extensions are loaded through importScripts
in a common web worker, if one of our extensions depends on symbol-observable
, it may break other extensions.
As a result, if lang-typescript is the only extension loaded, it works fine, but if you sideload the following "extension":
import 'symbol-observable'
export function activate(): void {
// noop
}
lang-typescript breaks with You provided an invalid object where a stream was expected
(#1243 (closed)).
Importing symbol-observable when starting the web worker fixes this by ensuring that the mutation of Symbol.observable
happens before any extensions are loaded.