Bug 137287 - For a Date object from a different frame: ""+date !== date.toString()
Summary: For a Date object from a different frame: ""+date !== date.toString()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-09-30 22:15 PDT by Will Thimbleby
Modified: 2016-09-09 10:55 PDT (History)
4 users (show)

See Also:


Attachments
Sandboxed date string conversion test case. (1.06 KB, text/html)
2014-09-30 22:15 PDT, Will Thimbleby
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Will Thimbleby 2014-09-30 22:15:00 PDT
Created attachment 238997 [details]
Sandboxed date string conversion test case.

Given a sandboxing iFrame, after creating a Date object from the sandbox, calling date.toString() gives a different result to calling ""+date.

The automatic conversion of the date to a string when appended to a string is wrong:
""+date === 1412140297227


See attachment with test case.
Comment 1 Alexey Proskuryakov 2014-10-04 17:07:37 PDT
This happens any time the date object is created via a different frame - it does not have to be display:none, and it doesn't have to be empty.
Comment 2 David Kilzer (:ddkilzer) 2016-09-09 10:55:33 PDT
<rdar://problem/28228212>