18.6.18日报

1,修复两处小崩溃,主要是多线程渲染页面时,devtools调试下断点再执行会触发。

2,修复vscode加载文件的问题。

原因是有个地方报错了。

这次研究的相关文件有:

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\comparers.js  intl相关的比较函数等

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\workbench\parts\files\electron-browser\views\explorerView.js   ExplorerView,左边的文件夹树控件

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\workbench\parts\files\electron-browser\views\explorerViewer.js 提供了数据源给ExplorerView

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\tree\browser\treeModel.js树控件的实现细节。

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\node\extfs.js 数据源需要用这个帮助函数读文件

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\workbench\services\files\electron-browser\fileService.js 数据源的文件服务相关。

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\workbench\parts\files\electron-browser\explorerViewlet.js

E:\test_code\vscode-master-1.23.1\resources\app\out\vs\workbench\parts\files\common\explorerModel.js

ExplorerItem在这里。ExplorerItem是每个树里的一横杠。

里面保存了文件名什么的。

ExplorerItem.create = function (raw, root, resolveTo)

raw.resource  里有文件名。

raw.children里有子目录。ExplorerItem.create里会通过raw.children来创建子树,也是调用的ExplorerItem.create。

报错的原因是Intl.Collator.compare没实现。

另外发现v8::FunctionTemplate::InstanceTemplate 只能用this.xxxx去取,this.prototype.xxxx取不到。

v8::FunctionTemplate::InstanceTemplate::PrototypeTemplate才可以

附部分堆栈:

ExplorerView (explorerView.js:44) create (types.js:164) InstantiationService._createInstance (instantiationService.js:106) InstantiationService.createInstance (instantiationService.js:67) ExplorerViewlet.createView (explorerViewlet.js:229) ViewsViewlet.updateViews (viewsViewlet.js:387) ViewsViewlet.onViewsRegistered (viewsViewlet.js:341) (anonymous) (viewsViewlet.js:224) step (viewsViewlet.js:62) (anonymous) (viewsViewlet.js:43) fulfilled (viewsViewlet.js:34) CompletePromise_then (winjs.base.js:1581) step (viewsViewlet.js:36) __awaiter (viewsViewlet.js:37) Promise_ctor (winjs.base.js:1656) __awaiter (viewsViewlet.js:33) ViewsViewlet.create (viewsViewlet.js:208) PersistentViewsViewlet.create (viewsViewlet.js:626) (anonymous) (explorerViewlet.js:186) step (explorerViewlet.js:62) (anonymous) (explorerViewlet.js:43) __awaiter (explorerViewlet.js:37) Promise_ctor (winjs.base.js:1656) __awaiter (explorerViewlet.js:33) ExplorerViewlet.create (explorerViewlet.js:183) (anonymous) (compositePart.js:149) Builder.doElement (builder.js:253) Builder.div (builder.js:155) CompositePart.showComposite (compositePart.js:145) (anonymous) (compositePart.js:89) CompletePromise_then (winjs.base.js:1581) CompositePart.doOpenComposite (compositePart.js:71) CompositePart.openComposite (compositePart.js:56) (anonymous) (sidebarPart.js:84) CompletePromise_then (winjs.base.js:1581) SidebarPart.openViewlet (sidebarPart.js:84) ViewletService.openViewlet (viewletService.js:69) Workbench.restoreParts (workbench.js:405) Workbench.startup (workbench.js:94) WorkbenchShell.createWorkbench (shell.js:56) WorkbenchShell.createContents (shell.js:37) WorkbenchShell.open (shell.js:280) (anonymous) (main.js:46) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) runCallback (timers.js:672) tryOnImmediate (timers.js:645) processImmediate (timers.js:617) Item (treeModel.js:167) (anonymous) (treeModel.js:354) CompletePromise_then (winjs.base.js:1581) doRefresh (treeModel.js:337) Item.refreshChildren (treeModel.js:381) (anonymous) (treeModel.js:245) (anonymous) (treeModel.js:65) Promise_ctor (winjs.base.js:1656) Lock.run (treeModel.js:60) Item.expand (treeModel.js:240) TreeModel.expand (treeModel.js:783) TreeModel.expandAll (treeModel.js:796) Tree.expandAll (treeImpl.js:130) (anonymous) (explorerView.js:645) CompletePromise_then (winjs.base.js:1581) setInputAndExpand (explorerView.js:645) (anonymous) (explorerView.js:667) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) argDone (winjs.base.js:1828) keys.forEach.Promise.then.errors.(anonymous function) (winjs.base.js:1853) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) argDone (winjs.base.js:1828) keys.forEach.Promise.then.errors.(anonymous function) (winjs.base.js:1853) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) (anonymous) (fileService.js:893) (anonymous) (fileService.js:968) (anonymous) (flow.js:32) (anonymous) (fileService.js:959) (anonymous) (fileService.js:968) (anonymous) (flow.js:32) resolve (fileService.js:944) (anonymous) (flow.js:131) looper_1 (flow.js:67) (anonymous) (flow.js:83) _combinedTickCallback (internal/process/next_tick.js:73) _tickCallback (internal/process/next_tick.js:104) FileDataSource.getChildren (explorerViewer.js:45) doRefresh (treeModel.js:332) Item.refreshChildren (treeModel.js:381) (anonymous) (treeModel.js:245) (anonymous) (treeModel.js:65) Promise_ctor (winjs.base.js:1656) Lock.run (treeModel.js:60) Item.expand (treeModel.js:240) TreeModel.expand (treeModel.js:783) TreeModel.expandAll (treeModel.js:796) Tree.expandAll (treeImpl.js:130) (anonymous) (explorerView.js:645) CompletePromise_then (winjs.base.js:1581) setInputAndExpand (explorerView.js:645) (anonymous) (explorerView.js:667) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) argDone (winjs.base.js:1828) keys.forEach.Promise.then.errors.(anonymous function) (winjs.base.js:1853) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) argDone (winjs.base.js:1828) keys.forEach.Promise.then.errors.(anonymous function) (winjs.base.js:1853) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) notifySuccess (winjs.base.js:1185) enter (winjs.base.js:867) _run (winjs.base.js:1083) _completed (winjs.base.js:1051) (anonymous) (fileService.js:893) (anonymous) (fileService.js:968) (anonymous) (flow.js:32) (anonymous) (fileService.js:959) (anonymous) (fileService.js:968) (anonymous) (flow.js:32) resolve (fileService.js:944) (anonymous) (flow.js:131) looper_1 (flow.js:67) (anonymous) (flow.js:83) _combinedTickCallback (internal/process/next_tick.js:73) _tickCallback (internal/process/next_tick.js:104) 出问题的地方,主进程发送消息 line:68, [E:\mycode\miniblink49\trunk\electron\lib\browser\api\web-contents.js] , [WebContents.send] line:22, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\ipc\common\ipc.electron.js] , [Protocol.send] line:60, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\ipc\common\ipc.js] , [] line:1581, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\winjs.base.js] , [CompletePromise_then] line:59, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\ipc\common\ipc.js] , [ChannelServer.onCommonRequest] line:41, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\ipc\common\ipc.js] , [ChannelServer.onMessage] line:32, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\ipc\common\ipc.js] , [] line:103, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\event.js] , [Emitter.fire] line:12, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\parts\ipc\common\ipc.electron.js] , [] line:327, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\event.js] , [] line:341, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\event.js] , [] line:103, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\event.js] , [Emitter.fire] line:496, [E:\test_code\vscode-master-1.23.1\resources\app\out\vs\base\common\event.js] , [fn] line:111, [events.js] , [emitTwo] line:191, [events.js] , [emit] line:33, [E:\mycode\miniblink49\trunk\electron\lib\browser\api\web-contents.js] , [] line:116, [events.js] , [emitThree] line:194, [events.js] , [emit] 出问题的地方,sharp页面的渲染进程要去connect 共享进程 line:870, [net.js] , [connect] line:934, [net.js] , [Socket.connect] line:74, [net.js] , [exports.connect.exports.createConnection] line:196, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/node/ipc.net.js] , [] line:1656, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [Promise_ctor] line:195, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/node/ipc.net.js] , [connect] line:192, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/workbench/electron-browser/shell.js] , [] line:1185, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [notifySuccess] line:867, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [enter] line:1083, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [_run] line:1051, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [_completed] line:144, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/common/ipc.js] , [_this.handlers.(anonymous function)] line:202, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/common/ipc.js] , [ChannelClient.onMessage] line:109, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/common/ipc.js] , [] line:103, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/event.js] , [Emitter.fire] line:12, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/common/ipc.electron.js] , [] line:103, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/event.js] , [Emitter.fire] line:496, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/event.js] , [fn] line:106, [events.js] , [emitTwo] line:191, [events.js] , [emit]  主进程创建第二个窗口 line:26, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\sharedProcess.js] , [get] line:55, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\decorators.js] , [descriptor.(anonymous function)] line:92, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\sharedProcess.js] , [] line:1185, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [notifySuccess] line:867, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [enter] line:1083, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [_run] line:1051, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [_completed] line:302, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\async.js] , [Barrier.open] line:88, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\sharedProcess.js] , [SharedProcess.spawn] line:414, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\app.js] , [CodeApplication.afterWindowOpen] line:247, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\app.js] , [] line:48, [E:\test_code\vscode-master-1.23.1\out\vs\platform\instantiation\common\instantiationService.js] , [InstantiationService.invokeFunction] line:247, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\app.js] , [] line:1581, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [CompletePromise_then] line:240, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\app.js] , [] line:1581, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [CompletePromise_then] line:225, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\app.js] , [CodeApplication.startup] line:345, [E:\test_code\vscode-master-1.23.1\out\vs\code\electron-main\main.js] , [] line:1185, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [notifySuccess] line:867, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [enter] line:1083, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [_run] line:1051, [E:\test_code\vscode-master-1.23.1\out\vs\base\common\winjs.base.js] , [_completed] line:189, [E:\test_code\vscode-master-1.23.1\out\vs\base\parts\ipc\node\ipc.net.js] , [] line:291, [events.js] , [g] line:86, [events.js] , [emitNone] line:185, [events.js] , [emit] line:1285, [net.js] , [emitListeningNT] line:71, [internal/process/next_tick.js] , [_combinedTickCallback] line:98, [internal/process/next_tick.js] , [_tickCallback] 渲染进程握手消息 Console:[111],[sharedProcess . sharedProcessMain.js handshake __callstack__],[file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js] stackTrace:     at handshake [111]:[14]:[file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js]     at startup [9]:[9]:[file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js]     at (anonymous function) [154]:[18]:[file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcess.js]     at Module._invokeFactory [952]:[41]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at Module.complete [965]:[36]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1580]:[20]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onModuleComplete [1592]:[30]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._resolve [1542]:[22]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager.defineModule [1196]:[18]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at ModuleManager._onLoad [1275]:[22]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at (anonymous function) [1447]:[31]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at OnlyOnceScriptLoader.triggerCallback [585]:[36]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at (anonymous function) [579]:[90]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at (anonymous function) [786]:[29]:[file:///e:/test_code/vscode-master-1.23.1/resources/app/out/vs/loader.js]     at readFileAfterClose [445]:[3]:[fs.js] HandleWrap::HandleWrap 09561D68 handshake:hey there 的时候创建 创建命名管道 FatalException: 18 line:1203, [net.js] , [createServerHandle] line:1243, [net.js] , [Server._listen2] line:1295, [net.js] , [listen] line:1384, [net.js] , [Server.listen] line:187, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/node/ipc.net.js] , [] line:1656, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [Promise_ctor] line:184, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/parts/ipc/node/ipc.net.js] , [serve] line:79, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js] , [setup] line:102, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js] , [setupIPC] line:113, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js] , [] line:1185, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [notifySuccess] line:867, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [enter] line:1083, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [_run] line:1051, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/base/common/winjs.base.js] , [_completed] line:106, [file:///E:/test_code/vscode-master-1.23.1/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js] , [] line:291, [events.js] , [g] line:106, [events.js] , [emitTwo] line:191, [events.js] , [emit]

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 17.12.4日报

    1,找到http://www.xinhuanet.com 图片显示不了的原因,curl没打开zip宏

    龙泉寺扫地僧
  • 18.3.1日报

    node/lib/module.js里会遍历各种目录,然后加到Module.paths里。 然后electron.asar\renderer\init.js里也...

    龙泉寺扫地僧
  • 17.10.14日报

    1,跟进一个用户的乱码问题,但发现该用户的winrar什么的都乱码,怀疑是字符串转换编码的那个windows api出了bug

    龙泉寺扫地僧
  • Grunt :初次使用及前端构建经验

    这是我们部门前端同学cobish的学习笔记,笔者编辑了一下并分享给大家。

    金蝶云平台
  • SAP UI5应用中的component-preload.js在Netweaver上的存储

    版权声明:本文为博主汪子熙原创文章,未经博主允许不得转载。 https://jerry.bl...

    Jerry Wang
  • Uncaught SyntaxError: Unexpected token ' in JSON at position 1

    玩蛇的胖纸
  • 现代Web开发系列教程_07

    jeremyxu
  • Vue 源码分析—— 目录结构

     1.compiler 目录包含Vue.js 所有编译相关的代码。它包括把所有模板解析成ast 语法树, ast 语法树优化等功能。

    用户1197315
  • 为啥总感觉跟前端开发“隔”了一层?因为你没有构建自己的三位一体的前端开发能力。

    三体一体,一般是指核反击能力,陆海空三个维度都有足够的能力。看清了哈,是反击的能力。 先说结论,我这个说法落实到具体人身上,就是“js技能 + 分析需求的能力 ...

    web前端教室
  • Webpack系列——快速入门

    多文件入口 对entry采用对象写法,指定对应的键值对,为了输出这多个文件可以使用占位符

    用户1515472

扫码关注云+社区

领取腾讯云代金券