是否有可能破坏上下文?
Node.JS 或 V8 中存在内存泄漏,导致我无法重新使用进程来 jqueryify 许多 HTML 页面。
该错误在这里:https://github.com/joyent/node/issues/1007
同时还有一个错误,当我完成上下文时,是否可以“销毁”它?这似乎可以对 jsdom 代码进行简单的修改,这样我就可以以逻辑方式编写自己的代码,而无需编写重新启动。
我们有一种方法来跟踪我们公司自己对开源项目的调整,这样我们就可以引入更新并仍然修复我们可能发现的错误,而无需等待开源社区。
如果我能破坏上下文,我想我就可以走了。
jsdom 的 tmpvar 说这是一个 Node.JS 问题,我不知道什么时候会修复它,因为这已经有几个月了,而且已经有很多未解决的问题 https://github.com/joyent/node/issues/637。
There is a memory leak in Node.JS or in V8 that removes my ability to re-use a process to jqueryify many HTML pages.
The bug is here: https://github.com/joyent/node/issues/1007
Bug meanwhile, is it possible to "destroy" a context when I am done with it? That seams like it might make for a simple hack to the jsdom code so I can move write my own code in a logical manner without writing the restarts.
We have a way to keep track of our company's own tweaks to Open Source projects so we can bring in updates and still fix bugs we may have found without waiting for the Open Source community.
If I can destroy the context, I think I will be good to go.
tmpvar at jsdom says this is a Node.JS issue and I don't know when it will be fixed because see this is months old and there are already many open issues https://github.com/joyent/node/issues/637.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能想到的最好方法是查看使用 节点 VM东西。
当您可以根据需要访问返回的上下文时,vm.runInNewContext 可能会很有用。
The best way I can think of is to look at using the node VM stuff.
vm.runInNewContext might be of use as you get access to the returned context do with as you wish.