芒果tv在miniblink无法显示的bug分析

http://www.mgtv.com/pcclient/tv/里用了window.external,

也用了jquery和jquery的rollbar库。

rollbar里会调用

stackTrace:     at (anonymous function) [4]:[10]:[]     at (anonymous function) [567]:[24]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at K.extend.globalEval [568]:[15]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at (anonymous function) [2694]:[49]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at K.extend.each [585]:[38]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at K.fn.extend.domManip [2685]:[31]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at K.fn.extend.append [2590]:[25]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at K.fn.extend.wrapAll [2565]:[20]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at RollBar [36]:[56]:[http://js.hunantv.com/imgotv-client/plugin/jquery.rollbar.js?v20150408]     at (anonymous function) [551]:[13]:[http://js.hunantv.com/imgotv-client/plugin/jquery.rollbar.js?v20150408]     at K.extend.each [585]:[38]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at K.fn.K.each [447]:[22]:[http://honey.hunantv.com/honey-2.0/lib/jquery.js?v20150408]     at $.fn.rollbar [550]:[21]:[http://js.hunantv.com/imgotv-client/plugin/jquery.rollbar.js?v20150408]     at (anonymous function) [198]:[24]:[file:///C:/Users/weo/Desktop/shansuo/index2.htm]     at (anonymous function) [205]:[9]:[file:///C:/Users/weo/Desktop/shansuo/index2.htm]     at c [1]:[761]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]     at (anonymous function) [1]:[2778]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]     at (anonymous function) [1]:[1383]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]

    at o [1]:[1715]:[http://honey.hunantv.com/honey-2.0/honey.hunantv.imgo.js?ver=BtGfVI+tgS]

这个globalEval 会把script标签取出来执行。由于mb没有window.external对象,所以执行第一个script标签就会出错,导致第二个script标签无法eval。从而导致图片等需要第二个标签绘制的逻辑无法走到

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

发表于

我来说两句

0 条评论
登录 后参与评论

扫码关注云+社区

领取腾讯云代金券