Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Issue 2387002: Prevent extensions from clobbering JSON implementation that extension calls use (Closed)

Created:
10 years, 7 months ago by rafaelw
Modified:
9 years, 7 months ago
CC:
chromium-reviews, jam+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., darin-cc_chromium.org, brettw-cc_chromium.org, pam+watch_chromium.org, Aaron Boodman
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

Prevent extensions from clobbering JSON implementation that extension calls use BUG=38857 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48667

Patch Set 1 #

Total comments: 2

Patch Set 2 : cr changes #

Patch Set 3 : fix tests #

Total comments: 7

Patch Set 4 : arv cr changes #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -21 lines) Patch
M chrome/renderer/resources/event_bindings.js View 1 2 3 2 chunks +35 lines, -1 line 1 comment Download
M chrome/renderer/resources/extension_process_bindings.js View 1 4 chunks +5 lines, -17 lines 0 comments Download
M chrome/renderer/resources/renderer_extension_bindings.js View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/messaging/connect/page.js View 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/messaging/connect/test.html View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
rafaelw
10 years, 7 months ago (2010-05-28 21:22:29 UTC) #1
Aaron Boodman
http://codereview.chromium.org/2387002/diff/1/4 File chrome/renderer/resources/renderer_extension_bindings.js (right): http://codereview.chromium.org/2387002/diff/1/4#newcode23 chrome/renderer/resources/renderer_extension_bindings.js:23: chromeHidden.JSON = {}; Since everything relies on event_bindings.js, it ...
10 years, 7 months ago (2010-05-28 21:42:50 UTC) #2
rafaelw
http://codereview.chromium.org/2387002/diff/1/4 File chrome/renderer/resources/renderer_extension_bindings.js (right): http://codereview.chromium.org/2387002/diff/1/4#newcode23 chrome/renderer/resources/renderer_extension_bindings.js:23: chromeHidden.JSON = {}; On 2010/05/28 21:42:50, Aaron Boodman wrote: ...
10 years, 7 months ago (2010-05-28 22:20:39 UTC) #3
Aaron Boodman
Nice. LGTM.
10 years, 7 months ago (2010-05-28 22:25:18 UTC) #4
arv1
I don't have access to a computer but toJSONString is not used by JSON so ...
10 years, 7 months ago (2010-05-29 04:36:01 UTC) #5
rafaelw1
The patch handles toJSON (not toJSONString). I think Aaron was just being "short-handy". It also ...
10 years, 7 months ago (2010-05-29 05:20:16 UTC) #6
PhistucK
http://codereview.chromium.org/2387002/diff/9001/7 File chrome/renderer/resources/event_bindings.js (right): http://codereview.chromium.org/2387002/diff/9001/7#newcode28 chrome/renderer/resources/event_bindings.js:28: Object.prototype.toJSON = customizedObjectToJSON; Did you not mean originalStringify here ...
10 years, 6 months ago (2010-05-29 12:42:26 UTC) #7
rafaelw
http://codereview.chromium.org/2387002/diff/9001/7 File chrome/renderer/resources/event_bindings.js (right): http://codereview.chromium.org/2387002/diff/9001/7#newcode28 chrome/renderer/resources/event_bindings.js:28: Object.prototype.toJSON = customizedObjectToJSON; The idea here is that if ...
10 years, 6 months ago (2010-05-29 14:17:09 UTC) #8
PhistucK
On 2010/05/29 14:17:09, rafaelw wrote: > http://codereview.chromium.org/2387002/diff/9001/7 > File chrome/renderer/resources/event_bindings.js (right): > > http://codereview.chromium.org/2387002/diff/9001/7#newcode28 > ...
10 years, 6 months ago (2010-05-29 14:24:29 UTC) #9
Aaron Boodman
On Sat, May 29, 2010 at 7:24 AM, <phistuck@gmail.com> wrote: > On 2010/05/29 14:17:09, rafaelw ...
10 years, 6 months ago (2010-05-29 16:28:55 UTC) #10
PhistucK
On 2010/05/29 16:28:55, Aaron Boodman wrote: > On Sat, May 29, 2010 at 7:24 AM, ...
10 years, 6 months ago (2010-05-29 19:24:23 UTC) #11
Aaron Boodman
On Sat, May 29, 2010 at 12:24 PM, <phistuck@gmail.com> wrote: > On 2010/05/29 16:28:55, Aaron ...
10 years, 6 months ago (2010-05-29 21:42:28 UTC) #12
PhistucK
On 2010/05/29 21:42:28, Aaron Boodman wrote: > Ah, the way the internal implementation of JSON.stringify ...
10 years, 6 months ago (2010-05-30 04:06:57 UTC) #13
arv (Not doing code reviews)
http://codereview.chromium.org/2387002/diff/9001/7 File chrome/renderer/resources/event_bindings.js (right): http://codereview.chromium.org/2387002/diff/9001/7#newcode22 chrome/renderer/resources/event_bindings.js:22: delete Object.prototype.toJSON; delete makes things slow in V8. Can ...
10 years, 6 months ago (2010-06-01 17:15:29 UTC) #14
rafaelw
arv: PTAL http://codereview.chromium.org/2387002/diff/9001/7 File chrome/renderer/resources/event_bindings.js (right): http://codereview.chromium.org/2387002/diff/9001/7#newcode22 chrome/renderer/resources/event_bindings.js:22: delete Object.prototype.toJSON; On 2010/06/01 17:15:29, arv wrote: ...
10 years, 6 months ago (2010-06-01 21:19:42 UTC) #15
arv (Not doing code reviews)
lgtm http://codereview.chromium.org/2387002/diff/22001/23001 File chrome/renderer/resources/event_bindings.js (right): http://codereview.chromium.org/2387002/diff/22001/23001#newcode15 chrome/renderer/resources/event_bindings.js:15: chromeHidden.JSON = new (function() { I don't really ...
10 years, 6 months ago (2010-06-01 21:38:22 UTC) #16
arv (Not doing code reviews)
10 years, 6 months ago (2010-06-01 21:38:55 UTC) #17
On 2010/06/01 21:19:42, rafaelw wrote:

> Done. Note that JSON isn't a type so it doesn't have a direct prototype.

Yeah, that was just a refactoring error.

Powered by Google App Engine
This is Rietveld 408576698