Closed
Bug 973905
Opened 11 years ago
Closed 11 years ago
window.setTimeout/setInterval string as parameter 1 no longer works if caller also tries to pass function arguments to the nonexistent function
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla30
People
(Reporter: tomhartland, Assigned: bzbarsky)
References
Details
(Keywords: regression, site-compat, Whiteboard: [qa-])
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
Sylvestre
:
approval-mozilla-aurora+
lsblakk
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140212131424
Steps to reproduce:
<html>
<head>
<script type="text/javascript">
window.setTimeout("alert('hello world');", 100, "javascript");
</script>
</head>
</html>
Actual results:
Error occurs: "Argument 1 of Window.setTimeout is not an object."
Expected results:
The script should be evaluated and executed as normal.
At some point in the distant past, I must have been told that the 3rd parameter had to be "javascript"... I have absolutely no idea why, or for what reason, but obviously this is not the case.
Unfortunately I have a LOT of legacy code that uses this format, and now it breaks as of v27. I am not in a position to update to update all the systems.
Comment 1•11 years ago
|
||
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: Untriaged → DOM
Ever confirmed: true
Keywords: regression
Product: Firefox → Core
Comment 2•11 years ago
|
||
Hm, looks like the WebIDL only allows additional arguments in the Function case:
http://dxr.mozilla.org/mozilla-central/source/dom/webidl/Window.webidl?from=Window.webidl#90
Boris, is there a reason for that? It doesn't match the spec, at least.
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 3•11 years ago
|
||
That looks like a bug in our IDL, yes.
Assignee: nobody → bzbarsky
Flags: needinfo?(bzbarsky)
Summary: window.setTimeout/setInterval string as parameter 1 no longer works → window.setTimeout/setInterval string as parameter 1 no longer works if caller also tries to pass function arguments to the nonexistent function
Whiteboard: [need review]
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8378099 -
Flags: review?(bugs)
Updated•11 years ago
|
Attachment #8378099 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 5•11 years ago
|
||
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla30
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8378099 [details] [diff] [review]
setTimeout/setInterval with a string first arg but more than two arguments should still work (and ignore the extra arguments).
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 918345
User impact if declined: Some web pages may not work right.
Testing completed (on m-c, etc.): Passes tests.
Risk to taking this patch (and alternatives if risky): I believe this is very low
risk.
String or IDL/UUID changes made by this patch: None.
Attachment #8378099 -
Flags: approval-mozilla-beta?
Attachment #8378099 -
Flags: approval-mozilla-aurora?
Comment 7•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Attachment #8378099 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•11 years ago
|
Comment 8•11 years ago
|
||
Updated•11 years ago
|
Attachment #8378099 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Updated•11 years ago
|
Updated•11 years ago
|
status-b2g-v1.3T:
--- → fixed
Updated•11 years ago
|
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•