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

Issue 84703003: Allow data URL > 2MB for loadDataWithBaseURL (Closed)

Created:
7 years ago by joth
Modified:
6 years, 11 months ago
CC:
chromium-reviews, jam, gavinp+memory_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, erikwright+watch_chromium.org, android-webview-reviews_chromium.org, miu+watch_chromium.org, Nico, ppi
Visibility:
Public.

Description

Allow payload data > 2MB for loadDataWithBaseURL This is needed for WebView Classic backwards compatibility - unforks KitKat release branch workaround https://android.googlesource.com/platform/external/chromium_org/+/63d0ac2aed^!/ Chrome has a limit of 2MB for any URL passed over IPC, to deal with this payload data in loadDataWithBaseURL is sent as a raw buffer. (This also more closely matches legacy semantics; e.g. no base64 encode needed). This does not fix the issue for WebView.loadData() or arbitrary loadUrl("data:...") navigations. I'll think about that as a followup. At the same time, upstream the LoadUrlParams creation wrapper methods from the glue layer into AwContents. This simplifies the underlying classes, makes the LoadDataWithBaseUrlTest more meaningful, and is needed to avoid the unnecessary base64 encoding of the data payload. BUG=298495

Patch Set 1 #

Patch Set 2 : findbugs1 #

Patch Set 3 : fix test #

Patch Set 4 : remove unintented post data edit #

Patch Set 5 : Tidy up #

Total comments: 5

Patch Set 6 : Bo comments #

Total comments: 1

Patch Set 7 : thakis comments #

Patch Set 8 : remove spurious method #

Patch Set 9 : remove net edits #

Total comments: 2

Patch Set 10 : upstream the LoadUrlParam factory methods too. #

Total comments: 2

Patch Set 11 : tests #

Patch Set 12 : rebase #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -67 lines) Patch
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +47 lines, -1 line 1 comment Download
M android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java View 1 2 3 4 5 6 7 8 9 3 chunks +23 lines, -4 lines 0 comments Download
M android_webview/native/state_serializer.cc View 1 2 3 4 5 6 7 8 9 3 chunks +27 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/android/load_url_params.cc View 1 2 chunks +0 lines, -6 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 3 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/common/content_param_traits.h View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M content/common/content_param_traits.cc View 1 2 3 4 5 6 1 chunk +35 lines, -0 lines 2 comments Download
M content/common/view_messages.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java View 1 2 3 4 5 6 7 8 9 5 chunks +9 lines, -45 lines 0 comments Download
M content/public/browser/navigation_controller.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/navigation_entry.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +27 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +14 lines, -10 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
joth
7 years ago (2013-11-26 00:52:58 UTC) #1
mkosiba (inactive)
LGTM
7 years ago (2013-11-26 10:07:42 UTC) #2
boliu
https://codereview.chromium.org/84703003/diff/160001/android_webview/native/state_serializer.cc File android_webview/native/state_serializer.cc (right): https://codereview.chromium.org/84703003/diff/160001/android_webview/native/state_serializer.cc#newcode264 android_webview/native/state_serializer.cc:264: if (!iterator->ReadString(&res->data())) Not pickle expert, but does can ReadString ...
7 years ago (2013-11-26 17:15:15 UTC) #3
joth
https://codereview.chromium.org/84703003/diff/160001/android_webview/native/state_serializer.cc File android_webview/native/state_serializer.cc (right): https://codereview.chromium.org/84703003/diff/160001/android_webview/native/state_serializer.cc#newcode264 android_webview/native/state_serializer.cc:264: if (!iterator->ReadString(&res->data())) On 2013/11/26 17:15:15, boliu wrote: > Not ...
7 years ago (2013-11-27 01:31:21 UTC) #4
joth
+thakis for base/memory
7 years ago (2013-11-27 01:34:21 UTC) #5
boliu
lgtm
7 years ago (2013-11-27 01:39:53 UTC) #6
joth
+ppi for net/
7 years ago (2013-11-27 01:49:14 UTC) #7
Nico
https://codereview.chromium.org/84703003/diff/170001/base/memory/ref_counted_memory.h File base/memory/ref_counted_memory.h (right): https://codereview.chromium.org/84703003/diff/170001/base/memory/ref_counted_memory.h#newcode26 base/memory/ref_counted_memory.h:26: static base::StringPiece AsString(const RefCountedMemory* memory); Huh, why is this ...
7 years ago (2013-11-27 01:49:49 UTC) #8
joth
Thanks! On 26 November 2013 17:49, <thakis@chromium.org> wrote: > > https://codereview.chromium.org/84703003/diff/170001/base/ > memory/ref_counted_memory.h > File ...
7 years ago (2013-11-27 01:53:46 UTC) #9
Nico
On Wed, Nov 27, 2013 at 10:53 AM, Jonathan Dixon <joth@chromium.org> wrote: > Thanks! > ...
7 years ago (2013-11-27 02:01:53 UTC) #10
joth
Thanks Thankis. With the NULL check at caller, it is just as clear to drop ...
7 years ago (2013-11-27 04:34:40 UTC) #11
joth
+jochen for content (non-androidy bits) +jln for content/common/view_messages.h
7 years ago (2013-11-27 04:38:39 UTC) #12
joth
-ppi as I removed the net/ edits too. (And ppi is not a net/android owner ...
7 years ago (2013-11-27 05:46:23 UTC) #13
Nico
https://codereview.chromium.org/84703003/diff/230001/android_webview/native/state_serializer.cc File android_webview/native/state_serializer.cc (right): https://codereview.chromium.org/84703003/diff/230001/android_webview/native/state_serializer.cc#newcode188 android_webview/native/state_serializer.cc:188: if (!pickle->WriteData(data, size)) Do you need to do this ...
7 years ago (2013-11-27 05:50:59 UTC) #14
joth
https://codereview.chromium.org/84703003/diff/230001/android_webview/native/state_serializer.cc File android_webview/native/state_serializer.cc (right): https://codereview.chromium.org/84703003/diff/230001/android_webview/native/state_serializer.cc#newcode188 android_webview/native/state_serializer.cc:188: if (!pickle->WriteData(data, size)) On 2013/11/27 05:50:59, Nico wrote: > ...
7 years ago (2013-11-27 06:23:15 UTC) #15
Nico
On Wed, Nov 27, 2013 at 3:23 PM, <joth@chromium.org> wrote: > > https://codereview.chromium.org/84703003/diff/230001/ > android_webview/native/state_serializer.cc ...
7 years ago (2013-11-27 06:41:42 UTC) #16
joth
On 2013/11/27 06:41:42, Nico wrote: > On Wed, Nov 27, 2013 at 3:23 PM, <mailto:joth@chromium.org> ...
7 years ago (2013-11-27 07:34:10 UTC) #17
jochen (gone - plz use gerrit)
could you add a content browsertest that creating a navigation entry with some data and ...
7 years ago (2013-11-27 08:41:04 UTC) #18
jochen (gone - plz use gerrit)
Also, please note in the CL description that the 2MB limit comes from the max ...
7 years ago (2013-11-27 08:48:20 UTC) #19
Ben Murdoch
https://codereview.chromium.org/84703003/diff/250001/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java File content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java (right): https://codereview.chromium.org/84703003/diff/250001/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java#newcode119 content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java:119: assert !baseUrl.startsWith("data:"); toLowerCase?
7 years ago (2013-11-27 17:00:41 UTC) #20
joth
Thanks jochen. Should be ready for another look. On 2013/11/27 08:41:04, jochen wrote: > could ...
7 years ago (2013-11-27 21:03:06 UTC) #21
joth
https://codereview.chromium.org/84703003/diff/250001/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java File content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java (right): https://codereview.chromium.org/84703003/diff/250001/content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java#newcode119 content/public/android/java/src/org/chromium/content/browser/LoadUrlParams.java:119: assert !baseUrl.startsWith("data:"); On 2013/11/27 17:00:42, Ben Murdoch wrote: > ...
7 years ago (2013-11-27 21:05:26 UTC) #22
joth
Jochen, jln: PTAL On Wednesday, 27 November 2013, wrote: > > https://codereview.chromium.org/84703003/diff/250001/ > content/public/android/java/src/org/chromium/content/ > ...
7 years ago (2013-11-28 16:50:21 UTC) #23
jln (very slow on Chromium)
Adding tsepez@ and palmer@ for advice. Do you know why URL data payloads are limited ...
7 years ago (2013-12-02 23:05:24 UTC) #24
Tom Sepez
On 2013/12/02 23:05:24, jln wrote: > Adding tsepez@ and palmer@ for advice. > > Do ...
7 years ago (2013-12-02 23:15:49 UTC) #25
joth
Regarding bumping up the limit, we don't have much numbers beyond knowing that 2MB was ...
7 years ago (2013-12-02 23:21:38 UTC) #26
Tom Sepez
> I'll have to have a think if there's a sensible way to reduce the ...
7 years ago (2013-12-02 23:35:11 UTC) #27
joth
On 2013/12/02 23:35:11, Tom Sepez wrote: > > I'll have to have a think if ...
7 years ago (2013-12-03 00:17:30 UTC) #28
Tom Sepez
> Did you have any opinion on us switching the limit to 10MB (even if ...
7 years ago (2013-12-03 00:19:49 UTC) #29
joth
OK I'll have a look at that. We only have ifdef for OS_ANDROID. webview is ...
7 years ago (2013-12-03 00:21:22 UTC) #30
Tom Sepez
On the other hand, history is not on our side. I finally tracked this down. ...
7 years ago (2013-12-03 00:27:37 UTC) #31
joth
Ha! Oh yes, the limit was in fact 10MB prior to https://codereview.chromium.org/1569011/diff/7001/chrome/common/chrome_constants.cc Sucks to be ...
7 years ago (2013-12-03 00:38:48 UTC) #32
jochen (gone - plz use gerrit)
i guess this CL is abandoned?
6 years, 11 months ago (2014-01-03 10:47:18 UTC) #33
joth
6 years, 11 months ago (2014-01-03 19:17:05 UTC) #34
On 2014/01/03 10:47:18, jochen wrote:
> i guess this CL is abandoned?

yes - it was done a different way in the end, in
https://codereview.chromium.org/112053002

Powered by Google App Engine
This is Rietveld 408576698