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

Issue 12433021: Modify content::GetFontTable so clients can control what is read. (Closed)

Created:
7 years, 9 months ago by bbudge
Modified:
7 years, 9 months ago
Reviewers:
palmer, brettw
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, darin-cc_chromium.org
Visibility:
Public.

Description

Modify content::GetFontTable to allow clients to control what is read. This will be used in an upcoming PPAPI Font API. This adds an offset, and changes the semantics so that the function will only read as much data as the client requests. Before, the function would fail if the buffer wasn't big enough. BUG=79375 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189505

Patch Set 1 #

Total comments: 2

Patch Set 2 : Modify param order. #

Total comments: 23

Patch Set 3 : Address first round of comments. #

Total comments: 12

Patch Set 4 : Address round 2 of comments. #

Patch Set 5 : Fixes #

Total comments: 8

Patch Set 6 : Address comments. #

Total comments: 1

Patch Set 7 : Clamp offsets larger than the data, don't fail. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -69 lines) Patch
M chrome/renderer/pepper/pepper_flash_font_file_host.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/renderer/pepper/ppb_pdf_impl.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/common/child_process_sandbox_support_impl_linux.cc View 1 2 3 4 5 6 2 chunks +59 lines, -62 lines 1 comment Download
M content/public/common/child_process_sandbox_support_linux.h View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
bbudge
Brett for chrome Chris for content please re-route if there are more appropriate reviewers
7 years, 9 months ago (2013-03-07 01:00:13 UTC) #1
brettw
lgtm https://codereview.chromium.org/12433021/diff/1/content/public/common/child_process_sandbox_support_linux.h File content/public/common/child_process_sandbox_support_linux.h (right): https://codereview.chromium.org/12433021/diff/1/content/public/common/child_process_sandbox_support_linux.h#newcode42 content/public/common/child_process_sandbox_support_linux.h:42: size_t* output_length, size_t offset); I think this would ...
7 years, 9 months ago (2013-03-07 23:10:26 UTC) #2
bbudge
https://codereview.chromium.org/12433021/diff/1/content/public/common/child_process_sandbox_support_linux.h File content/public/common/child_process_sandbox_support_linux.h (right): https://codereview.chromium.org/12433021/diff/1/content/public/common/child_process_sandbox_support_linux.h#newcode42 content/public/common/child_process_sandbox_support_linux.h:42: size_t* output_length, size_t offset); On 2013/03/07 23:10:26, brettw wrote: ...
7 years, 9 months ago (2013-03-07 23:50:56 UTC) #3
Chris Evans
https://codereview.chromium.org/12433021/diff/12001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/12001/content/common/child_process_sandbox_support_impl_linux.cc#newcode111 content/common/child_process_sandbox_support_impl_linux.cc:111: length -= offset; I don't understand this change. This ...
7 years, 9 months ago (2013-03-14 18:15:30 UTC) #4
bbudge
https://codereview.chromium.org/12433021/diff/12001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/12001/content/common/child_process_sandbox_support_impl_linux.cc#newcode111 content/common/child_process_sandbox_support_impl_linux.cc:111: length -= offset; It's a little tricky but the ...
7 years, 9 months ago (2013-03-14 18:21:26 UTC) #5
bbudge
Giving Chris a break, reassigning to palmer to check for security issues.
7 years, 9 months ago (2013-03-14 18:25:43 UTC) #6
palmer
https://codereview.chromium.org/12433021/diff/12001/chrome/renderer/pepper/pepper_flash_font_file_host.cc File chrome/renderer/pepper/pepper_flash_font_file_host.cc (right): https://codereview.chromium.org/12433021/diff/12001/chrome/renderer/pepper/pepper_flash_font_file_host.cc#newcode57 chrome/renderer/pepper/pepper_flash_font_file_host.cc:57: #if defined(OS_LINUX) || defined(OS_OPENBSD) What about the other BSDs? ...
7 years, 9 months ago (2013-03-14 19:26:43 UTC) #7
bbudge
I changed the 'offset' parameter type to off_t. The amount of duplicated code got to ...
7 years, 9 months ago (2013-03-15 22:25:34 UTC) #8
palmer
https://codereview.chromium.org/12433021/diff/36001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/36001/content/common/child_process_sandbox_support_impl_linux.cc#newcode131 content/common/child_process_sandbox_support_impl_linux.cc:131: new uint8_t[num_tables * kDirEntrySize]); OPTIONAL NIT: Maybe give this ...
7 years, 9 months ago (2013-03-15 23:16:47 UTC) #9
bbudge
My Friday was already ruined. https://codereview.chromium.org/12433021/diff/36001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/36001/content/common/child_process_sandbox_support_impl_linux.cc#newcode131 content/common/child_process_sandbox_support_impl_linux.cc:131: new uint8_t[num_tables * kDirEntrySize]); ...
7 years, 9 months ago (2013-03-16 00:07:03 UTC) #10
bbudge
Tested against new font API and fixed some bugs. I also reworked the common epilogue ...
7 years, 9 months ago (2013-03-18 22:25:54 UTC) #11
palmer
https://codereview.chromium.org/12433021/diff/43001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/43001/content/common/child_process_sandbox_support_impl_linux.cc#newcode106 content/common/child_process_sandbox_support_impl_linux.cc:106: // To prevent overflow, limit offset to 2 GB. ...
7 years, 9 months ago (2013-03-19 21:35:15 UTC) #12
bbudge
https://codereview.chromium.org/12433021/diff/43001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/43001/content/common/child_process_sandbox_support_impl_linux.cc#newcode106 content/common/child_process_sandbox_support_impl_linux.cc:106: // To prevent overflow, limit offset to 2 GB. ...
7 years, 9 months ago (2013-03-19 23:09:17 UTC) #13
bbudge
Ready for another look.
7 years, 9 months ago (2013-03-20 16:56:40 UTC) #14
bbudge
One more tweak. https://codereview.chromium.org/12433021/diff/65001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): https://codereview.chromium.org/12433021/diff/65001/content/common/child_process_sandbox_support_impl_linux.cc#newcode154 content/common/child_process_sandbox_support_impl_linux.cc:154: offset = std::min(offset, base::checked_numeric_cast<off_t>(data_length)); Without this ...
7 years, 9 months ago (2013-03-20 19:50:03 UTC) #15
palmer
LGTM. Thanks for putting up with my type persnickitiness. :)
7 years, 9 months ago (2013-03-20 22:14:15 UTC) #16
bbudge
On 2013/03/20 22:14:15, Chris P. wrote: > LGTM. Thanks for putting up with my type ...
7 years, 9 months ago (2013-03-20 22:17:33 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bbudge@chromium.org/12433021/65001
7 years, 9 months ago (2013-03-20 22:21:39 UTC) #18
commit-bot: I haz the power
7 years, 9 months ago (2013-03-21 03:16:26 UTC) #19
Message was sent while issue was closed.
Change committed as 189505

Powered by Google App Engine
This is Rietveld 408576698