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

Issue 518693002: Fix a crash when saving a <canvas> or <img> image which is large. (Closed)

Created:
6 years, 3 months ago by zino
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix a crash when saving a <canvas> or <img> image which is large. The problem is caused by size-limits of GURL. (the limit < 2MiB) We can use string of data url instead of GURL to avoid the size-limits. For this end, added a new method to Blink side: https://crrev.com/518043003 BUG=69227, 401888 Committed: https://crrev.com/632a1a7256d3aada4c2deefb103cac2ca4fc56d9 Cr-Commit-Position: refs/heads/master@{#295405}

Patch Set 1 #

Total comments: 9

Patch Set 2 : #

Total comments: 7

Patch Set 3 : #

Patch Set 4 : #

Total comments: 16

Patch Set 5 : #

Total comments: 6

Patch Set 6 : kbr's comments #

Patch Set 7 : CONTENT_EXPORT #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+193 lines, -26 lines) Patch
M chrome/browser/renderer_context_menu/render_view_context_menu.cc View 1 2 3 4 5 2 chunks +6 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.h View 1 2 3 4 5 6 3 chunks +13 lines, -5 lines 1 comment Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 5 6 6 chunks +31 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_view_host_unittest.cc View 1 2 3 4 5 6 2 chunks +70 lines, -0 lines 0 comments Download
M content/common/content_constants_internal.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/content_constants_internal.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 2 chunks +9 lines, -3 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -5 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (14 generated)
zino
Please take a look. I tried to make a auto test but I don't know ...
6 years, 3 months ago (2014-08-29 13:40:05 UTC) #1
Justin Novosad
Not an OWNER, but I think this is fine. You should add test though. https://codereview.chromium.org/518693002/diff/1/content/renderer/render_frame_impl.cc ...
6 years, 3 months ago (2014-08-29 13:52:33 UTC) #2
Ken Russell (switch to Gerrit)
palmer/jln: security review please. jamesr: content/renderer/ review please. I think this approach is the best ...
6 years, 3 months ago (2014-08-29 23:29:26 UTC) #4
palmer
https://codereview.chromium.org/518693002/diff/1/content/browser/renderer_host/render_message_filter.cc File content/browser/renderer_host/render_message_filter.cc (right): https://codereview.chromium.org/518693002/diff/1/content/browser/renderer_host/render_message_filter.cc#newcode908 content/browser/renderer_host/render_message_filter.cc:908: DownloadUrl(render_view_id, GURL(encoded_image_data), And do something to make sure the ...
6 years, 3 months ago (2014-08-30 00:37:29 UTC) #5
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/518693002/diff/1/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/518693002/diff/1/content/common/view_messages.h#newcode1264 content/common/view_messages.h:1264: std::string /* encoded_image_data */, On 2014/08/30 00:37:29, Chromium Palmer ...
6 years, 3 months ago (2014-08-30 00:52:09 UTC) #6
palmer
> Chris, in this case I think it's better to send the image over as ...
6 years, 3 months ago (2014-08-30 00:55:09 UTC) #7
zino
Dear all, I probably addressed all your comments and I also fixed a bug when ...
6 years, 3 months ago (2014-09-02 07:07:09 UTC) #8
palmer
https://codereview.chromium.org/518693002/diff/20001/content/browser/renderer_host/render_message_filter.cc File content/browser/renderer_host/render_message_filter.cc (right): https://codereview.chromium.org/518693002/diff/20001/content/browser/renderer_host/render_message_filter.cc#newcode909 content/browser/renderer_host/render_message_filter.cc:909: const int MAX_LENGTH_OF_DATA_URL = 1024 * 1024 * 10; ...
6 years, 3 months ago (2014-09-02 17:58:04 UTC) #9
Avi (use Gerrit)
No further comments for now; the issues seem to be covered. https://codereview.chromium.org/518693002/diff/20001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): ...
6 years, 3 months ago (2014-09-02 22:33:12 UTC) #10
zino
Thank you for review. Could you take a look again? https://codereview.chromium.org/518693002/diff/20001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/518693002/diff/20001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode1089 ...
6 years, 3 months ago (2014-09-03 01:45:58 UTC) #12
palmer
> > I still think it would be a good idea to check this limit ...
6 years, 3 months ago (2014-09-03 03:00:30 UTC) #13
zino
On 2014/09/03 03:00:30, Chromium Palmer wrote: > I'm sorry, I should have been more clear. ...
6 years, 3 months ago (2014-09-03 05:20:42 UTC) #14
Avi (use Gerrit)
https://codereview.chromium.org/518693002/diff/80001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/518693002/diff/80001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode1089 chrome/browser/renderer_context_menu/render_view_context_menu.cc:1089: // If |params_.src_url| is empty, it might be a ...
6 years, 3 months ago (2014-09-03 15:21:05 UTC) #15
palmer
IPC security LGTM. Thanks! But Avi makes a good point; you should probably handle his ...
6 years, 3 months ago (2014-09-03 17:31:46 UTC) #16
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/518693002/diff/80001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File chrome/browser/renderer_context_menu/render_view_context_menu.cc (right): https://codereview.chromium.org/518693002/diff/80001/chrome/browser/renderer_context_menu/render_view_context_menu.cc#newcode1089 chrome/browser/renderer_context_menu/render_view_context_menu.cc:1089: // If |params_.src_url| is empty, it might be a ...
6 years, 3 months ago (2014-09-04 00:23:26 UTC) #17
zino
Thank you for review :-) My thinking is.. When popup up a context menu, renderer ...
6 years, 3 months ago (2014-09-05 03:47:47 UTC) #19
Ken Russell (switch to Gerrit)
Thanks for your updates. One issue in the browser side code, then this will look ...
6 years, 3 months ago (2014-09-11 00:38:53 UTC) #20
Ken Russell (switch to Gerrit)
By the way, thank you for the clear explanation of how this code works and ...
6 years, 3 months ago (2014-09-11 00:44:53 UTC) #21
zino
Thank you for review. I addressed comments. Could you take a look again? https://codereview.chromium.org/518693002/diff/120001/chrome/browser/renderer_context_menu/render_view_context_menu.cc File ...
6 years, 3 months ago (2014-09-12 09:38:28 UTC) #23
zino
Ping @kbr. Please take a look.
6 years, 3 months ago (2014-09-12 23:40:51 UTC) #27
Ken Russell (switch to Gerrit)
Very nice. Thank you for the excellent test. LGTM
6 years, 3 months ago (2014-09-13 05:47:00 UTC) #28
zino
Ping @Avi, Could you review this again? This CL needs your approval for chrome/* and ...
6 years, 3 months ago (2014-09-13 14:40:45 UTC) #29
Avi (use Gerrit)
LGTM; thanks!
6 years, 3 months ago (2014-09-13 20:09:47 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/518693002/210001
6 years, 3 months ago (2014-09-16 22:17:28 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/14357)
6 years, 3 months ago (2014-09-16 23:07:07 UTC) #34
zino
Ping @Avi, The RenderMessageFilter class should be exposed for unit test. Would you agree with ...
6 years, 3 months ago (2014-09-17 06:30:45 UTC) #39
Avi (use Gerrit)
lgtm That's fine.
6 years, 3 months ago (2014-09-18 02:04:35 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patchset/518693002/310001
6 years, 3 months ago (2014-09-18 02:06:44 UTC) #42
commit-bot: I haz the power
Committed patchset #7 (id:310001) as 21eb6b3b04cbae7b185cf2256d20bf5f38e17913
6 years, 3 months ago (2014-09-18 03:03:05 UTC) #43
commit-bot: I haz the power
6 years, 3 months ago (2014-09-18 03:03:41 UTC) #44
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/632a1a7256d3aada4c2deefb103cac2ca4fc56d9
Cr-Commit-Position: refs/heads/master@{#295405}

Powered by Google App Engine
This is Rietveld 408576698