Closed
Bug 973849
Opened 12 years ago
Closed 12 years ago
clearTimeout / clearInterval now throw when called without arguments
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: dobbs.troy, Assigned: bzbarsky)
References
()
Details
(Keywords: regression, site-compat, Whiteboard: [qa-])
Attachments
(1 file)
|
2.74 KB,
patch
|
smaug
:
review+
Sylvestre
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140212131424
Steps to reproduce:
Firefox automatically upgraded from 27.0.0 to 27.0.1 and now the second step of complicated javascript on http://thegatheringinlittlerock.com/ will no longer run in canvas.
Actual results:
First step of js shows the loading clock, but when the site is loaded and runs, the canvas "growing tree" no longer functions.
Expected results:
The tree should have grown in canvas as it did with previous version...
| Reporter | ||
Updated•12 years ago
|
Comment 1•12 years ago
|
||
An error shown in Error console:
Error: TypeError: Not enough arguments to Window.clearTimeout.
Source File: http://thegatheringinlittlerock.com/js/gathering.js
Line: 348
Regression window:
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/5717dfc80960
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 ID:20131026184508
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/508288a2b62c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 ID:20131027021707
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=5717dfc80960&tochange=508288a2b62c
Regressed by:
508288a2b62c Peter Van der Beken — Bug 918345 - Turn on WebIDL binding generation for Window and hook it up to quickstubs. r=bz.
Blocks: 918345
Status: UNCONFIRMED → NEW
status-firefox27:
--- → affected
status-firefox28:
--- → affected
status-firefox29:
--- → affected
status-firefox30:
--- → affected
status-firefox-esr24:
--- → unaffected
Component: General → DOM
Ever confirmed: true
Keywords: regression
Comment 2•12 years ago
|
||
Chrome didn't throw, but IE11 throws like our new behavior.
Updated•12 years ago
|
tracking-firefox27:
--- → ?
tracking-firefox28:
--- → ?
tracking-firefox29:
--- → ?
tracking-firefox30:
--- → ?
Summary: Complicated JS no longer functioning → clearTimeout / clearInterval now throw when called without arguments
| Assignee | ||
Comment 3•12 years ago
|
||
The relevant line in the script is:
clearTimeout();
The old (XPCOM) implementation explicitly listed the argument as optional here, and ignored the no-op call if no argument was passed. Wish we'd had tests for that bit..
Our new behavior is following the spec, like IE11 is, but maybe the spec just needs changing here.
As data, I just tested the IE behavior on http://fiddle.jshell.net/DXPN4/1/show/ and a no-arguments call to clearTimeout is a no-op in IE8, but throws in IE9+ in standards mode. Presumably this site was never tested in IE. :(
| Assignee | ||
Comment 4•12 years ago
|
||
I assume, btw, that the page meant to call "timeoutClear", not "clearTimeout", on that line. But of course that wouldn't do much good, since that would only clear one timeout, not all 10 it wants to clear. So this page is generally just pretty broken in terms of its timeout handling...
Comment 5•12 years ago
|
||
If we're following the current spec, and the page is broken in handling timeouts, this doesn't look like a release-blocker (or even a valid bug).
| Assignee | ||
Comment 7•12 years ago
|
||
This is breaking other sites too. I've filed a spec bug at https://www.w3.org/Bugs/Public/show_bug.cgi?id=24778 and I think we should revert this change on our end, though probably not for 27 at this point.
| Assignee | ||
Comment 8•12 years ago
|
||
Attachment #8380242 -
Flags: review?(bugs)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
| Assignee | ||
Updated•12 years ago
|
Whiteboard: [need review]
Comment 9•12 years ago
|
||
Comment on attachment 8380242 [details] [diff] [review]
Allow clearInterval/clearTimeout calls with no arguments; just treat them as no-ops.
ah, we special case 0 in the implementation.
Attachment #8380242 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 10•12 years ago
|
||
| Assignee | ||
Updated•12 years ago
|
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla30
| Assignee | ||
Comment 11•12 years ago
|
||
Comment on attachment 8380242 [details] [diff] [review]
Allow clearInterval/clearTimeout calls with no arguments; just treat them as no-ops.
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 918345
User impact if declined: Some websites are broken
Testing completed (on m-c, etc.): Passes tests.
Risk to taking this patch (and alternatives if risky): Low risk. Just restores
the Firefox 26 behavior for clearInterval/clearTimeout.
String or IDL/UUID changes made by this patch: None
Attachment #8380242 -
Flags: approval-mozilla-beta?
Attachment #8380242 -
Flags: approval-mozilla-aurora?
Comment 12•12 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/016b9229193e because I wasn't bright enough to figure out whether it was this or bug 972312 causing Windows builds to say https://tbpl.mozilla.org/php/getParsedLog.php?id=35109146&tree=Mozilla-Inbound and https://tbpl.mozilla.org/php/getParsedLog.php?id=35109059&tree=Mozilla-Inbound
| Assignee | ||
Comment 13•12 years ago
|
||
It was the other bug. Relanded: https://hg.mozilla.org/integration/mozilla-inbound/rev/6d22d19bcd2f
Comment 14•12 years ago
|
||
I will wait for the patch in m-c to approve the uplift
Comment 15•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Attachment #8380242 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•12 years ago
|
tracking-firefox30:
? → ---
Comment 16•12 years ago
|
||
Updated•12 years ago
|
Updated•12 years ago
|
Attachment #8380242 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 17•12 years ago
|
||
Comment 18•12 years ago
|
||
Deprioritizing this for QA testing given in-testsuite coverage. Please remove the [qa-] whiteboard tag and add the verifyme keyword if this needs manual testing before release.
Whiteboard: [qa-]
Comment 19•12 years ago
|
||
Updated•12 years ago
|
status-b2g-v1.3:
--- → fixed
status-b2g-v1.4:
--- → fixed
Updated•12 years ago
|
status-b2g-v1.3T:
--- → fixed
Updated•11 years ago
|
Keywords: site-compat
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•