承诺需要15秒才能运行“然后”功能

时间:2015-07-26 21:17:59

标签: javascript google-chrome google-chrome-extension bluebird

Promise.resolve(true).then(function(){console.log("run");});

此代码需要15-16秒才能将“运行”返回到控制台。

版本:

  • Chrome 46.0.2466.0 canary(64位)(在44.0.2403.107版(64位)中正常工作)
  • bluebird@2.9.34
  • browserify@11.0.0

我在Chrome扩展程序背景页面中包含的脚本中运行它(通过<script>标记加载)。

该脚本使用browserify构建,bluebird包含在:

Promise = require('bluebird')

我认为chrome / node环境管理超时的方式存在差异?

有什么想法吗?

0 个答案:

没有答案
相关问题