GoogleChromeLabs / carlo

Web rendering surface for Node applications
Apache License 2.0
9.31k stars 309 forks source link

fix(rpc): it should be possible to wrap handle #74

Closed alexkozy closed 5 years ago

alexkozy commented 5 years ago

It can be useful in following example where backend is exposed to another process.

class Backend {
  async createService(fullName, ...args) {
    return rpc.handle(await rpc_process.spawn(fullName, args));
  }
};
pavelfeldman commented 5 years ago

No need to get handles to handles, handles can be passed around worlds just fine. See rpc.md.

class Backend {
  createService(fullName, ...args) {
    return rpc_process.spawn(fullName, args);
  }
};
pavelfeldman commented 5 years ago

Resolving ambiguity in https://github.com/GoogleChromeLabs/carlo/commit/3312fb3e6c3f5d3440ec55778a19f977e8169798