Last Comment Bug 771946 - "Assertion failure: ToInteger(year) == year," or "Assertion failure: ToInteger(date) == date," or "Assertion failure: ToInteger(month) == month,"
: "Assertion failure: ToInteger(year) == year," or "Assertion failure: ToIntege...
Status: RESOLVED FIXED
[js:t]
: assertion, regression, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All All
: -- critical (vote)
: mozilla16
Assigned To: Jeff Walden [:Waldo] (remove +bmo to email)
: general
:
Mentors:
Depends on:
Blocks: jsfunfuzz 771742
  Show dependency treegraph
 
Reported: 2012-07-08 14:13 PDT by Gary Kwong [:gkw] [:nth10sd]
Modified: 2013-01-19 14:04 PST (History)
5 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
stack (3.32 KB, text/plain)
2012-07-08 14:13 PDT, Gary Kwong [:gkw] [:nth10sd]
no flags Details
Convert most date spec methods to take, produce doubles (15.65 KB, patch)
2012-07-09 14:28 PDT, Jeff Walden [:Waldo] (remove +bmo to email)
luke: review+
Details | Diff | Splinter Review

Description Gary Kwong [:gkw] [:nth10sd] 2012-07-08 14:13:56 PDT
Created attachment 640099 [details]
stack

Date.prototype.setFullYear(Math.cos(1))

asserts js debug shell on m-c changeset 221f1a184f67 without any CLI arguments at Assertion failure: ToInteger(year) == year,

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   98627:e68d62b3ab83
user:        Jeff Walden
date:        Fri Jul 06 13:53:11 2012 -0700
summary:     Bug 771742 - Reimplement the Date.prototype.set<date component> functions in terms of their spec steps, and remove the hard-to-understand date_makeDate.  r=luke
Comment 1 Gary Kwong [:gkw] [:nth10sd] 2012-07-08 14:56:36 PDT
Date.prototype.setUTCDate(Math.tan(1))

asserts at a similar assertion:

Assertion failure: ToInteger(date) == date,
Comment 2 Jesse Ruderman 2012-07-09 00:18:08 PDT
No need for trig functions. You can substitute the value and still assert:

Date.prototype.setUTCDate(1.5)
Comment 3 Gary Kwong [:gkw] [:nth10sd] 2012-07-09 10:24:03 PDT
Date.prototype.setMonth(1.5)

Assertion failure: ToInteger(month) == month,
Comment 4 Jeff Walden [:Waldo] (remove +bmo to email) 2012-07-09 14:28:42 PDT
Created attachment 640359 [details] [diff] [review]
Convert most date spec methods to take, produce doubles

I don't know how we managed to avoid all the intermediate checking before, at least not without being buggy in boundary cases.  But I think this covers everything.
Comment 5 Luke Wagner [:luke] 2012-07-09 15:15:41 PDT
Comment on attachment 640359 [details] [diff] [review]
Convert most date spec methods to take, produce doubles

Goofy
Comment 6 Jeff Walden [:Waldo] (remove +bmo to email) 2012-07-10 17:48:25 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/57e0bdd6f6c7
Comment 7 Ed Morley [:emorley] 2012-07-11 09:32:50 PDT
https://hg.mozilla.org/mozilla-central/rev/57e0bdd6f6c7
Comment 8 Christian Holler (:decoder) 2013-01-19 14:04:02 PST
Automatically extracted testcase for this bug was committed:

https://hg.mozilla.org/mozilla-central/rev/efaf8960a929

Note You need to log in before you can comment on or make changes to this bug.