提交 83492366 编写于 作者: J Johannes Rieken

make perf util loadable from web, https://github.com/microsoft/vscode/issues/101850

上级 295923e1
......@@ -73,7 +73,8 @@ function _factory(sharedObj) {
// Because we want both instances to use the same perf-data
// we store them globally
let sharedObj;
// eslint-disable-next-line no-var
var sharedObj;
if (typeof global === 'object') {
// nodejs
sharedObj = global;
......@@ -91,5 +92,5 @@ if (typeof define === 'function') {
// commonjs
module.exports = _factory(sharedObj);
} else {
// invalid context...
sharedObj.perf = _factory(sharedObj);
}
......@@ -42,9 +42,13 @@
}
};
</script>
<script src="./static/out/vs/base/common/performance.js"></script>
<script src="./static/out/vs/loader.js"></script>
<script>
// NOTE: Changes to inline scripts require update of content security policy
require(['vs/code/browser/workbench/workbench'], function() {});
perf.mark('willLoadWorkbenchMain');
require(['vs/code/browser/workbench/workbench'], function() {
perf.mark('didLoadWorkbenchMain');
});
</script>
</html>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册