Closed Bug 1436225 Opened 7 years ago Closed 3 months ago

blocking script and cpu high with SetTimeout

Categories

(Core :: JavaScript Engine, defect, P3)

60 Branch
Unspecified
Windows 10
defect

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox58 --- affected
firefox59 --- affected
firefox60 --- affected

People

(Reporter: karlcow, Unassigned)

References

()

Details

(Whiteboard: [webcompat] [js])

This is a spin-off of https://webcompat.com/issues/5506 Navigate to: http://en.miui.com/forum.php?mod=viewthread&tid=556362&highlight=miui%2B9 Expected Behavior: It should load the full page. Actual Behavior: It loaded the top portion of the page. Entire tab got frozen. CPU usage skyrocketed. A horizontal bar on top asked if i want to wait or stop the page. This is happening from Firefox 55 to Firefox 60 (at least) fwiw the same thing is happening in Chrome, but it handles it in a better way. Chrome is giving this message > stat.php?id=2441309&web_id=2441309:16 A parser-blocking, cross site (i.e. different eTLD+1) script, http://c.cnzz.com/core.php?web_id=2441309&t=z, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details. na @ stat.php?id=2441309&web_id=2441309:16 also http://static.en.intl.miui.com/static/js/common.js?bX4z ``` Uncaught TypeError: Cannot read property 'addEventListener' of null at _attachEvent (common.js?bX4z:130) at header_extend.js?bX4z:16 ``` which refers to ```js function _attachEvent(obj, evt, func, eventobj) { eventobj = !eventobj ? obj : eventobj; if(obj.addEventListener) { obj.addEventListener(evt, func, false); } else if(eventobj.attachEvent) { obj.attachEvent('on' + evt, func); } } ``` but indeed Chrome seems to handle it better. when I force stop the script in Firefox. ``` Error: Script terminated by timeout at: _relatedlinks/msg<@http://static.en.intl.miui.com/static/js/common_extra.js?bX4z:28:18 _relatedlinks@http://static.en.intl.miui.com/static/js/common_extra.js?bX4z:27:8 @http://static.en.intl.miui.com/static/js/common.js?bX4z line 521 > eval:1:1 run@http://static.en.intl.miui.com/static/js/common.js?bX4z:521:4 checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:528:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 checkrun/<@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:28 setTimeout handler*checkrun@http://static.en.intl.miui.com/static/js/common.js?bX4z:530:4 $F@http://static.en.intl.miui.com/static/js/common.js?bX4z:538:2 relatedlinks@http://static.en.intl.miui.com/static/js/common.js?bX4z:2199:2 @http://en.miui.com/forum.php?mod=viewthread&tid=556362&highlight=miui%2B9:3876:1 ```
Flags: webcompat?
This isn't the sort of thing we call a web compat issue. It's a quality of life issue. Unquestionably, we can do better.
Priority: -- → P3
Flags: webcompat?

Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.

Webcompat Priority: --- → ?

See bug 1547409. Migrating whiteboard priority tags to program flags.

Severity: normal → S3
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.