-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
tl;dr - You shall not use URI in signatures or the types referenced from extHost.protocol.ts anymore. Use UriComponents and URI.revive instead
We use a custom marshaller in the extension host <-> renderer communication layer. It treats URI and RegExp specially, and makes them like JSON primitive types. This is helpful, for example, when passing an argument of type URI over the wire, you know for a fact that on the receiving side, the object is an instance of URI.
However, this is expensive, as it needs to run on each and every object sent over the wire, in a deep, recursive manner. It is very easy to avoid using the custom marshaller, simply replace the usage of URI with UriComponents which is JSON friendly (an interface without methods). Then, in the implementation, you can use URI.revive(...) to get back a real URI.
For RegExp objects (extremely rare usage), you're gonna have to roll your own strategy.
All edits should result in removing ProxyType.CustomMarshaller from the proxies defined in extHost.protocol.ts.
See b64355b for an example adoption
Remaining: 12 out of 49:
- MainThreadCommands
- MainThreadConfiguration @sandy081
- MainThreadDebugService @weinand
- MainThreadLanguageFeatures
- MainThreadSCM @joaomoreno
- MainThreadTask @dbaeumer
- ExtHostCommands
- ExtHostConfiguration @sandy081
- ExtHostDebugService @weinand
- ExtHostLanguageFeatures
- ExtHostSCM @joaomoreno
- ExtHostTask @dbaeumer