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

Issue 10711045: SES: Repair v8 Array methods getting implicit this=window. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by kpreid2
Modified:
12 years, 4 months ago
Reviewers:
MarkM, ihab.awad
CC:
caja-discuss-undisclosed_googlegroups.com, MarkM, felix8a, ihab.awad, Jasvir, kpreid2, metaweta, MikeSamuel
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fixes <http://code.google.com/p/v8/issues/detail?id=2758>. Array.prototype.{pop, push, shift, unshift, slice, splice, concat} are wrapped if they are not already wrapped by other repairs. Future work after this security patch is deployed: * In principle, the bug might get partially fixed, and we should thus have an independent test and repair for each method to avoid unnecessary wrappers and the subtest() gimmick; I have refrained from adding such novel things to repairES5's patterns for now. * es53-test-scan-guest should be extended to detect this category of problems. @r5550

Patch Set 1 #

Total comments: 16

Patch Set 2 : SES: Repair v8 Array methods getting implicit this=window. #

Patch Set 3 : SES: Repair v8 Array methods getting implicit this=window. #

Total comments: 2

Patch Set 4 : SES: Repair v8 Array methods getting implicit this=window. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+120 lines, -0 lines) Patch
M src/com/google/caja/ses/repairES5.js View 1 2 3 3 chunks +120 lines, -0 lines 0 comments Download

Messages

Total messages: 10
kpreid2
12 years, 6 months ago (2013-07-03 19:39:52 UTC) #1
MarkM
https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js#newcode831 src/com/google/caja/ses/repairES5.js:831: var origLength = global.length; What if global.length doesn't exist ...
12 years, 6 months ago (2013-07-03 21:37:31 UTC) #2
kpreid2
Fixes <http://code.google.com/p/v8/issues/detail?id=2758>. Array.prototype.{pop, push, shift, unshift, slice, splice, concat} are wrapped if they are not ...
12 years, 6 months ago (2013-07-03 21:52:40 UTC) #3
kpreid2
https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js#newcode831 src/com/google/caja/ses/repairES5.js:831: var origLength = global.length; On 2013/07/03 21:37:31, MarkM wrote: ...
12 years, 6 months ago (2013-07-03 21:53:01 UTC) #4
ihab.awad
lgtm++ and thanks for the quick fix! https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js#newcode889 src/com/google/caja/ses/repairES5.js:889: if (status ...
12 years, 6 months ago (2013-07-03 23:02:07 UTC) #5
kpreid2
Fixes <http://code.google.com/p/v8/issues/detail?id=2758>. Array.prototype.{pop, push, shift, unshift, slice, splice, concat} are wrapped if they are not ...
12 years, 6 months ago (2013-07-03 23:12:13 UTC) #6
kpreid2
https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/10711045/diff/1/src/com/google/caja/ses/repairES5.js#newcode889 src/com/google/caja/ses/repairES5.js:889: if (status !== false) { return status; } On ...
12 years, 6 months ago (2013-07-03 23:13:34 UTC) #7
MarkM
LGTM given typeof guarding isFinite https://codereview.appspot.com/10711045/diff/10001/src/com/google/caja/ses/repairES5.js File src/com/google/caja/ses/repairES5.js (right): https://codereview.appspot.com/10711045/diff/10001/src/com/google/caja/ses/repairES5.js#newcode841 src/com/google/caja/ses/repairES5.js:841: var minSaveLength = (isFinite(global.length) ...
12 years, 6 months ago (2013-07-04 01:04:02 UTC) #8
kpreid2
Fixes <http://code.google.com/p/v8/issues/detail?id=2758>. Array.prototype.{pop, push, shift, unshift, slice, splice, concat} are wrapped if they are not ...
12 years, 6 months ago (2013-07-04 01:14:03 UTC) #9
kpreid2
12 years, 6 months ago (2013-07-04 01:14:45 UTC) #10
https://codereview.appspot.com/10711045/diff/10001/src/com/google/caja/ses/re...
File src/com/google/caja/ses/repairES5.js (right):

https://codereview.appspot.com/10711045/diff/10001/src/com/google/caja/ses/re...
src/com/google/caja/ses/repairES5.js:841: var minSaveLength =
(isFinite(global.length) ? global.length : 0) + 2;
On 2013/07/04 01:04:03, MarkM wrote:
> isFinite('') === true
> isFinite('1') === true
> 
> isFinite does a ToNumber on its argument. I think you should guard it with a
> typeof x === 'number'.

Done.
Sign in to reply to this message.

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