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

Issue 247900043: ES5/3 compatibility fixes for native accessor properties and Error inheritance. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
8 years, 9 months ago by kpreid_google
Modified:
8 years, 9 months ago
CC:
google-caja-discuss_googlegroups.com
Visibility:
Public.

Description

* For Chrome 44 <https://github.com/google/caja/issues/1967>, avoid doing "O[P] = O[P]" in the case where it would be a noop by ES3 rules, which seems to be sufficient for the issue. * Found while testing: markFunc did nothing if the function was already marked. Since the Error subclass constructors now inherit from the Error constructor per ES6 (and in Chrome), this would cause the subclasses to not get new___ configured, so 'new EvalError(...)' would act as 'new Error(...)'. The new___ property now uses the "o.new___ === o" pattern to avoid being seen as inherited. @ fbbe498f106d5a41ce337dfc10ad50a8b8441245

Patch Set 1 #

Total comments: 9

Patch Set 2 : ES5/3 compatibility fixes for native accessor properties and Error inheritance. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -10 lines) Patch
M src/com/google/caja/es53.js View 1 9 chunks +18 lines, -10 lines 0 comments Download

Messages

Total messages: 10
kpreid_google
8 years, 9 months ago (2015-06-09 21:18:34 UTC) #1
kpreid_google
Mike Stay, I'm asking you to take a look at this because it's touching ES5/3 ...
8 years, 9 months ago (2015-06-09 21:24:05 UTC) #2
MarkM
https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js#newcode721 src/com/google/caja/es53.js:721: if (fn.ok___ && fn.hasOwnProperty('ok___')) { return fn; } I ...
8 years, 9 months ago (2015-06-09 22:40:31 UTC) #3
kpreid_google
https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js#newcode721 src/com/google/caja/es53.js:721: if (fn.ok___ && fn.hasOwnProperty('ok___')) { return fn; } On ...
8 years, 9 months ago (2015-06-09 22:54:58 UTC) #4
Mark S. Miller
https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js#newcode2633 src/com/google/caja/es53.js:2633: // native ES5 accessors. On 2015/06/09 22:54:57, kpreid_google wrote: ...
8 years, 9 months ago (2015-06-09 22:59:23 UTC) #5
metaweta
https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js#newcode721 src/com/google/caja/es53.js:721: if (fn.ok___ && fn.hasOwnProperty('ok___')) { return fn; } fn.ok___ ...
8 years, 9 months ago (2015-06-09 23:18:19 UTC) #6
kpreid_google
* For Chrome 44 <https://github.com/google/caja/issues/1967>, avoid doing "O[P] = O[P]" in the case where it ...
8 years, 9 months ago (2015-06-10 19:05:16 UTC) #7
kpreid_google
https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js File src/com/google/caja/es53.js (right): https://codereview.appspot.com/247900043/diff/1/src/com/google/caja/es53.js#newcode721 src/com/google/caja/es53.js:721: if (fn.ok___ && fn.hasOwnProperty('ok___')) { return fn; } On ...
8 years, 9 months ago (2015-06-10 19:08:19 UTC) #8
metaweta
LGTM
8 years, 9 months ago (2015-06-10 19:10:49 UTC) #9
MarkM
8 years, 9 months ago (2015-06-10 19:20:13 UTC) #10
LGTM too,
Sign in to reply to this message.

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