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

Issue 12243002: Pass WebKit priority changes and parsing messages up to the browser process. (Closed)

Created:
7 years, 10 months ago by James Simonsen
Modified:
7 years, 10 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Visibility:
Public.

Description

Pass WebKit priority changes and parsing messages up to browser process. These signals will be consumed by the upcoming ResourceScheduler. The first use case will be preloaded images. WebKit will initially preload images at IDLE priority. Once the image is needed by the parser, it will be promoted to normal image priority (LOW). This nets us a 2-3% PLT improvement. BUG=163963

Patch Set 1 #

Total comments: 2

Patch Set 2 : Plumb ResourceScheduler messages to browser #

Patch Set 3 : Rebase #

Total comments: 4

Patch Set 4 : Rename IPC #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -32 lines) Patch
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 chunks +1 line, -27 lines 0 comments Download
M content/common/resource_dispatcher.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/resource_dispatcher.cc View 1 4 chunks +19 lines, -0 lines 0 comments Download
M content/common/resource_messages.h View 1 3 chunks +7 lines, -1 line 0 comments Download
M content/common/view_messages.h View 1 2 3 1 chunk +5 lines, -0 lines 2 comments Download
M content/public/common/common_param_traits_macros.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/glue/resource_loader_bridge.h View 1 3 chunks +7 lines, -1 line 0 comments Download
M webkit/glue/resource_loader_bridge.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M webkit/glue/weburlloader_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/weburlloader_impl.cc View 1 5 chunks +39 lines, -1 line 0 comments Download
M webkit/tools/test_shell/simple_resource_loader_bridge.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
James Simonsen
You might want to skim ResourceScheduler.h in my other patch as a reminder of how ...
7 years, 10 months ago (2013-02-06 04:32:26 UTC) #1
willchan no longer on Chromium
I do not believe it will cause harm. Can you set BUG to https://code.google.com/p/chromium/issues/detail?id=163963?
7 years, 10 months ago (2013-02-06 04:46:14 UTC) #2
James Simonsen
Done.
7 years, 10 months ago (2013-02-06 04:48:17 UTC) #3
darin (slow to review)
https://codereview.chromium.org/12243002/diff/1/content/browser/loader/resource_dispatcher_host_impl.cc File content/browser/loader/resource_dispatcher_host_impl.cc (right): https://codereview.chromium.org/12243002/diff/1/content/browser/loader/resource_dispatcher_host_impl.cc#newcode1143 content/browser/loader/resource_dispatcher_host_impl.cc:1143: loader->ChangePriority(ConvertWebKitPriorityToNetPriority(priority)); Maybe instead of routing this notification through the ...
7 years, 10 months ago (2013-02-06 05:04:13 UTC) #4
James Simonsen
Fair enough. Passing through to the ResourceThrottle was the ugliest part and the additional map ...
7 years, 10 months ago (2013-02-06 22:41:29 UTC) #5
darin (slow to review)
There are actually a number of cases where ResourceHandler subclasses need to subscribe to IPC ...
7 years, 10 months ago (2013-02-06 22:44:43 UTC) #6
James Simonsen
BTW, this CL stands on its own. Please review it when you get a chance. ...
7 years, 10 months ago (2013-02-07 03:39:31 UTC) #7
darin (slow to review)
LGTM https://codereview.chromium.org/12243002/diff/11001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/12243002/diff/11001/content/renderer/render_view_impl.cc#newcode4479 content/renderer/render_view_impl.cc:4479: if (frame == webview()->mainFrame()) { nit: !frame->parent() is ...
7 years, 10 months ago (2013-02-07 07:40:41 UTC) #8
James Simonsen
Adding security reviewer for new IPC messages. https://codereview.chromium.org/12243002/diff/11001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/12243002/diff/11001/content/renderer/render_view_impl.cc#newcode4479 content/renderer/render_view_impl.cc:4479: if (frame ...
7 years, 10 months ago (2013-02-11 22:53:11 UTC) #9
Cris Neckar
lgtm for IPC message security audit https://codereview.chromium.org/12243002/diff/12013/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/12243002/diff/12013/content/common/view_messages.h#newcode2401 content/common/view_messages.h:2401: IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody) Please also ...
7 years, 10 months ago (2013-02-11 23:14:12 UTC) #10
willchan no longer on Chromium
https://codereview.chromium.org/12243002/diff/12013/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/12243002/diff/12013/content/common/view_messages.h#newcode2401 content/common/view_messages.h:2401: IPC_MESSAGE_ROUTED0(ViewHostMsg_WillInsertBody) On 2013/02/11 23:14:12, Cris Neckar wrote: > Please ...
7 years, 10 months ago (2013-02-11 23:20:49 UTC) #11
Cris Neckar
On 2013/02/11 23:20:49, willchan wrote: > https://codereview.chromium.org/12243002/diff/12013/content/common/view_messages.h > File content/common/view_messages.h (right): > > https://codereview.chromium.org/12243002/diff/12013/content/common/view_messages.h#newcode2401 > ...
7 years, 10 months ago (2013-02-11 23:22:24 UTC) #12
willchan no longer on Chromium
Oh, I was thinking more in terms of forcing people to get reviews for the ...
7 years, 10 months ago (2013-02-11 23:36:25 UTC) #13
James Simonsen
I was just trying to split up the ResourceScheduler CL into smaller pieces. Plumbing up ...
7 years, 10 months ago (2013-02-12 00:09:00 UTC) #14
Cris Neckar
7 years, 10 months ago (2013-02-12 20:41:33 UTC) #15
> I thought the security review was just to make sure I'm not passing something
> stupid around, like a FD.
> 
> If we need to review the handler now, I'll just have to merge this in to the
> ResourceScheduler CL and have you guys review that.

We ALWAYS need to review handlers, especially for messages to the browser.
Otherwise we end up with benign sounding messages which do insane things.
 
> FWIW, an unhandled IPC doesn't cause a crash. I can browse around just fine
with
> this build.

Weird I thought we forced the renderer to crash when we got a browser message
with no handler.

Powered by Google App Engine
This is Rietveld 408576698