Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(74)

Issue 13348055: Warn on calling WeakMap as a function; ES5/3 log to console by default. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by kpreid2
Modified:
12 years, 6 months ago
Reviewers:
Mark S. Miller, MarkM
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

* Warn when WeakMap is called as a function rather than a constructor. Doing so is an error in ES6 spec drafts and Chrome Canary, so we should not be more lenient when using emulated maps. Fixes <https://code.google.com/p/google-caja/issues/detail?id=1832>. * Use log-to-console.js in ES5/3 taming and guest frames; previously, cajaVM.log would go nowhere in ES5/3 mode. * Update log-to-console.js to pass linter. @r5595

Patch Set 1 #

Total comments: 4

Patch Set 2 : Warn on calling WeakMap as a function; ES5/3 log to console by default. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -18 lines) Patch
M build.xml View 2 chunks +2 lines, -0 lines 0 comments Download
M src/com/google/caja/es53.js View 1 1 chunk +13 lines, -1 line 0 comments Download
M src/com/google/caja/log-to-console.js View 2 chunks +21 lines, -16 lines 0 comments Download
M src/com/google/caja/ses/WeakMap.js View 1 3 chunks +20 lines, -1 line 0 comments Download

Messages

Total messages: 6
kpreid2
12 years, 6 months ago (2013-09-10 21:29:14 UTC) #1
MarkM
ses/* stuff LGTM https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js File src/com/google/caja/ses/WeakMap.js (right): https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js#newcode374 src/com/google/caja/ses/WeakMap.js:374: if (!(this instanceof OurWeakMap)) { Add ...
12 years, 6 months ago (2013-09-10 22:33:30 UTC) #2
Mark S. Miller
On Tue, Sep 10, 2013 at 3:33 PM, <erights@gmail.com> wrote: > ses/* stuff LGTM > ...
12 years, 6 months ago (2013-09-10 22:38:18 UTC) #3
kpreid2
* Warn when WeakMap is called as a function rather than a constructor. Doing so ...
12 years, 6 months ago (2013-09-10 23:00:32 UTC) #4
kpreid2
https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js File src/com/google/caja/ses/WeakMap.js (right): https://codereview.appspot.com/13348055/diff/1/src/com/google/caja/ses/WeakMap.js#newcode374 src/com/google/caja/ses/WeakMap.js:374: if (!(this instanceof OurWeakMap)) { On 2013/09/10 22:33:30, MarkM ...
12 years, 6 months ago (2013-09-10 23:00:51 UTC) #5
MarkM
12 years, 6 months ago (2013-09-10 23:35:37 UTC) #6
I went ahead and looked at the rest. All LGTM.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b