1.5.2 hello world 创建默认ts文件就会报错:mutating the [[Prototype]] of an object

版本 1.5.2
操作系统win7x64
创建Hello world,新建一个ts脚本,编译运行,就会报错:
jsb_polyfill.js:34922:12:mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create
the object with the correct initial [[Prototype]] value using Object.create

好像和 extends cc.Component 有关。
怎么消除这个告警呢?

麻烦试试 1.6,这个是因为之前的模拟器 SpiderMonkey 版本太老了。

有没有什么办法在js层面屏蔽这个警告?
甚至修改jsb_polyfill.js都可以,1.5.2已经上线了,服务器收到太多这个错误了:grin:

那就不要用 extends …

非常感谢你回复我。
我把 jsb_polyfill.js 34922的这个函数屏蔽了,就没有告警了,跑了一下项目,好像也正常运行的:
//extendStatics(d, b);
这么干可以吗?

完整:
window.__extends = function(d, b) {
34922行: //extendStatics(d, b);
function () {
this.constructor = d;
}
d.prototype = null === b ? Object.create(b) : (
.prototype = b.prototype, new __());
};

那样可能会有问题,要不你不要屏蔽那个,这样改试试

var extendStatics = function (d, b) { for (var p in b) if (b.hasOwnProperty§) d[p] = b[p]; };

嗯嗯,要得,我试了可以,暂时没有发现问题,谢谢支持!