Issue 1467 in google-caja: ES5 working inconsistently with Date objects

5 views
Skip to first unread message

googl...@googlecode.com

unread,
May 18, 2012, 6:12:42 PM5/18/12
to google-ca...@googlegroups.com
Status: New
Owner: metaw...@gmail.com
Labels: Type-Defect Priority-Medium

New issue 1467 by jas...@gmail.com: ES5 working inconsistently with Date
objects
http://code.google.com/p/google-caja/issues/detail?id=1467

What steps will reproduce the problem?

Date does not work correctly in ES5 mode.

Go to http://caja.appspot.com/?es5=true

<div id="foo"></div>
​<script>
document.getElementById("foo").innerHTML = new Date();
try {
alert(new Date())
} catch(e) { alert(String(e)); }
</script>​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

The DOM updates the date correctly but the alert fails with the following
error:
TypeError: Untaming of guest constructed objects unsupported: Fri May 18
2012 15:06:26 GMT-0700 (PDT)



googl...@googlecode.com

unread,
May 21, 2012, 11:32:16 PM5/21/12
to google-ca...@googlegroups.com

Comment #1 on issue 1467 by metaw...@gmail.com: ES5 working inconsistently
The trouble is with the taming layer. Since we make a snapshot of arrays,
we've decided to snapshot objects as well.

googl...@googlecode.com

unread,
May 23, 2012, 6:11:39 PM5/23/12
to google-ca...@googlegroups.com
Updates:
Status: Pending

Comment #2 on issue 1467 by metaw...@gmail.com: ES5 working inconsistently
http://codereview.appspot.com/6241043/

googl...@googlecode.com

unread,
May 24, 2012, 7:59:18 PM5/24/12
to google-ca...@googlegroups.com
Updates:
Status: Fixed

Comment #3 on issue 1467 by metaw...@gmail.com: ES5 working inconsistently
@r4886

Reply all
Reply to author
Forward
0 new messages