Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

Commit

Permalink
feat(rpc): migrate to carlo.loadParams(). (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman authored and alexkozy committed Nov 23, 2018
1 parent 238e61b commit 3722a3e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = {
"no-unsafe-negation": 2,
"radix": 2,
"valid-typeof": 2,
"no-unused-vars": [2, { "args": "none", "vars": "local", "varsIgnorePattern": "(_|carloRpcWorldParams|load)" }],
"no-unused-vars": [2, { "args": "none", "vars": "local", "varsIgnorePattern": "(_|load)" }],
"no-implicit-globals": [2],

// es2015 features
Expand Down
2 changes: 1 addition & 1 deletion front_end/ndb/InspectorFrontendHostOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
const threads = runtime._extensions.find(e => e._descriptor.className === 'Sources.ThreadsSidebarPane');
threads._descriptor.className = 'UI.Widget';
threads._descriptor.title = 'Node processes';
Ndb.backend = await carloRpcWorldParams;
[Ndb.backend] = await carlo.loadParams();
const info = await getProcessInfo();
hostBackend = await Ndb.backend.createService('inspector_frontend_host.js', info.configDir);
callback(await hostBackend.getPreferences());
Expand Down
6 changes: 0 additions & 6 deletions front_end/ndb_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,4 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// TODO: expose Carlo's RPC world params to userland.
const carloRpcWorldParams = new Promise(resolve => self.load = backend => {
delete self.load;
resolve(backend);
});

Runtime.startApplication('ndb_app');
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"author": "The Chromium Authors",
"license": "Apache-2.0",
"dependencies": {
"carlo": "^0.9.29",
"carlo": "^0.9.31",
"chokidar": "^2.0.4",
"fs-copy-file-sync": "^1.1.1",
"isbinaryfile": "^3.0.3",
Expand Down

0 comments on commit 3722a3e

Please sign in to comment.