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

Issue 97041: valija apply() sometimes fails on non-firefox browsers (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 10 months ago by felix8a
Modified:
16 years, 10 months ago
Reviewers:
metaweta
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

http://code.google.com/p/google-caja/issues/detail?id=1077 in valija, calling fn.apply({}) eventually calls Array.slice(undefined, 0). in firefox, Array.slice is a builtin and returns []. on other browsers, Array.slice is defined in cajita.js, which tries to evaluate undefined.length, which throws an exception. this change makes cajita's Array.slice behave more like firefox's.

Patch Set 1 #

Patch Set 2 : valija apply() sometimes fails on non-firefox browsers #

Patch Set 3 : valija apply() sometimes fails on non-firefox browsers #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -2 lines) Patch
M src/com/google/caja/cajita.js View 1 2 1 chunk +10 lines, -2 lines 0 comments Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 2 chunks +12 lines, -0 lines 0 comments Download

Messages

Total messages: 10
felix8a
16 years, 10 months ago (2009-07-20 09:07:01 UTC) #1
metaweta
LGTM
16 years, 10 months ago (2009-07-20 14:13:10 UTC) #2
metaweta
Sorry, just thought of a weird case to consider: Number.prototype.length = 2; Number.prototype[0] = 6; ...
16 years, 10 months ago (2009-07-20 14:26:04 UTC) #3
felix8a
On 2009/07/20 14:26:04, metaweta wrote: > Sorry, just thought of a weird case to consider: ...
16 years, 10 months ago (2009-07-20 16:13:40 UTC) #4
felix8a
hangon, that's still not right. need to delete the if..
16 years, 10 months ago (2009-07-20 16:16:06 UTC) #5
metaweta
Mark posted this to the list: "We don't need to worry about such code. It ...
16 years, 10 months ago (2009-07-20 16:20:54 UTC) #6
felix8a
On 2009/07/20 16:16:06, felix8a wrote: > hangon, that's still not right. need to delete the ...
16 years, 10 months ago (2009-07-20 16:21:02 UTC) #7
felix8a
On 2009/07/20 16:20:54, metaweta wrote: > Mark posted this to the list: > "We don't ...
16 years, 10 months ago (2009-07-20 16:28:15 UTC) #8
metaweta
LGTM
16 years, 10 months ago (2009-07-20 17:00:57 UTC) #9
felix8a
16 years, 10 months ago (2009-07-21 22:19:51 UTC) #10
@r3601
Sign in to reply to this message.

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