Closed Bug 165580 Opened 23 years ago Closed 23 years ago

Using the getTime() method causes abrupt exit - no error messages

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 160602

People

(Reporter: les, Assigned: rogerl)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020721 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020721 I'm attempting to use JavaScript to force a reload of a webcam image every two minutes. The technique works by appending a query string to the URL of the image, the string being the result of getTime() on a new Date object. This works perfectly in IE6, NS6, even Opera 6. Mozilla appears to take great exception to this and exits immediately the getTime() method is used. The example is a stripped down page which just attempts to do a document.write of the getTime() result. Nothing fancy, the page is validated XHTML. Reproducible: Always Steps to Reproduce: 1.Open Mozilla 2.Enter URL in address bar and press Enter 3.Watch Mozilla disappear from screen Actual Results: Mozilla disappeared. No error message, not so much as a Dr Watson. Expected Results: Either executed the standard JavaScript or at least produced an error message.
Just updated browser to Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 - same result as with 1.1b
WFM Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
Les, thanks for catching this. We actually have an open bug on this: bug 160602, in which it was found that getTime() could cause a crash. It actually turned out not to be getTime() per se, but rather the way JS is handling the large integers that such methods return. You will be cc'ed on bug 160602 to follow its progress. When that bug is markd "FIXED", your testcase should work (wait 24 hours after the fix is announced before pulling a new Mozilla build). If at such time your testcase still doesn't work, please reopen bug 160602. Thanks - *** This bug has been marked as a duplicate of 160602 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Verified Duplicate -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.