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

Issue 2645813002: Add TaskRunnerHelper::get for Frame that casts to LocalFrame if possible or uses nullptr. (Closed)

Created:
3 years, 11 months ago by joelhockey
Modified:
3 years, 10 months ago
Reviewers:
haraken, sashab, dcheng
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, rwlbuis, sof
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add TaskRunnerHelper::get for Frame that casts to LocalFrame if possible or uses nullptr. BUG=624694

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TaskRunnerHelper.cpp View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
joelhockey
3 years, 11 months ago (2017-01-19 04:44:02 UTC) #2
sashab
LGTM :-)
3 years, 11 months ago (2017-01-19 04:45:18 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2645813002/1
3 years, 11 months ago (2017-01-19 04:54:57 UTC) #5
sashab
LGTM but please check with haraken or dcheng before landing :) Thx
3 years, 11 months ago (2017-01-19 04:58:57 UTC) #7
joelhockey
dcheng/haraken it is helpful to add this static get method for https://codereview.chromium.org/2648433003
3 years, 11 months ago (2017-01-19 05:03:57 UTC) #9
dcheng
On 2017/01/19 05:03:57, joelhockey wrote: > dcheng/haraken it is helpful to add this static get ...
3 years, 11 months ago (2017-01-19 05:25:52 UTC) #10
joelhockey
On 2017/01/19 at 05:25:52, dcheng wrote: > On 2017/01/19 05:03:57, joelhockey wrote: > > dcheng/haraken ...
3 years, 11 months ago (2017-01-19 05:37:13 UTC) #11
dcheng
On 2017/01/19 05:37:13, joelhockey wrote: > On 2017/01/19 at 05:25:52, dcheng wrote: > > On ...
3 years, 11 months ago (2017-01-19 05:59:53 UTC) #12
joelhockey
On 2017/01/19 at 05:59:53, dcheng wrote: > On 2017/01/19 05:37:13, joelhockey wrote: > > On ...
3 years, 11 months ago (2017-01-19 06:06:53 UTC) #13
dcheng
On 2017/01/19 06:06:53, joelhockey wrote: > On 2017/01/19 at 05:59:53, dcheng wrote: > > On ...
3 years, 11 months ago (2017-01-19 06:10:13 UTC) #14
joelhockey
On 2017/01/19 at 06:10:13, dcheng wrote: > On 2017/01/19 06:06:53, joelhockey wrote: > > On ...
3 years, 11 months ago (2017-01-19 06:17:46 UTC) #15
dcheng
On 2017/01/19 06:17:46, joelhockey wrote: > On 2017/01/19 at 06:10:13, dcheng wrote: > > On ...
3 years, 11 months ago (2017-01-19 06:18:44 UTC) #16
joelhockey
On 2017/01/19 at 06:18:44, dcheng wrote: > On 2017/01/19 06:17:46, joelhockey wrote: > > On ...
3 years, 11 months ago (2017-01-19 09:42:49 UTC) #17
joelhockey
On 2017/01/19 at 09:42:49, joelhockey wrote: > On 2017/01/19 at 06:18:44, dcheng wrote: > > ...
3 years, 11 months ago (2017-01-20 09:36:03 UTC) #18
dcheng
On 2017/01/20 09:36:03, joelhockey wrote: > On 2017/01/19 at 09:42:49, joelhockey wrote: > > On ...
3 years, 11 months ago (2017-01-20 19:04:37 UTC) #19
joelhockey
3 years, 10 months ago (2017-02-01 07:13:50 UTC) #20
On 2017/01/20 at 19:04:37, dcheng wrote:
> On 2017/01/20 09:36:03, joelhockey wrote:
> > On 2017/01/19 at 09:42:49, joelhockey wrote:
> > > On 2017/01/19 at 06:18:44, dcheng wrote:
> > > > On 2017/01/19 06:17:46, joelhockey wrote:
> > > > > On 2017/01/19 at 06:10:13, dcheng wrote:
> > > > > > On 2017/01/19 06:06:53, joelhockey wrote:
> > > > > > > On 2017/01/19 at 05:59:53, dcheng wrote:
> > > > > > > > On 2017/01/19 05:37:13, joelhockey wrote:
> > > > > > > > > On 2017/01/19 at 05:25:52, dcheng wrote:
> > > > > > > > > > On 2017/01/19 05:03:57, joelhockey wrote:
> > > > > > > > > > > dcheng/haraken it is helpful to add this static get method
for
> > > > > > > > > > > https://codereview.chromium.org/2648433003
> > > > > > > > > > 
> > > > > > > > > > Are there places where this would be useful? It seems like
we
> > should
> > > > > > > already
> > > > > > > > > have a LocalFrame in the places where we'd want to use this.
> > > > > > > > > 
> > > > > > > > > This is useful in the CL that I linked to
> > > > > > > > > (https://codereview.chromium.org/2648433003), specifically at
> > > > > > > > >
> > > > > > >
> > > > >
> >
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/frame/Pla...
> > > > > > > > > where the available Page object has only a Frame, but not a
> > LocalFrame. 
> > > > > > > From
> > > > > > > > > what I read at
> > > > > > > > >
> > > > > > >
> > > > >
> >
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/page/Page...,
> > > > > > > > > there is no guarantee that a Frame is always a LocalFrame.
> > > > > > > > 
> > > > > > > > Oops, sorry, I missed that part of the message, sorry.
> > > > > > > > 
> > > > > > > > IMO, for things that are page-associated, we should not use a
> > > > > frame-specific
> > > > > > > task queue. Just trying to use the task queue of the main frame
> > doesn't work
> > > > > > > once the frame isn't local.
> > > > > > > 
> > > > > > > So, should I leave this code to use the original Timer class?
> > > > > > 
> > > > > > I looked a little more closely, and it looks like all the things
that
> > > > > construct a PlatformEventController originally start with a frame or
> > document.
> > > > > So in this case, I think we should actually fix the plumbing in
> > > > > PlatformEventController. WDYT?
> > > > > 
> > > > > I'm very new to chrome.  This is about my 3rd CL, so I don't have a
whole
> > lot of
> > > > > thoughts ;-)
> > > > > But what you are saying makes sense.  I'll have a look at all the
callers
> > and
> > > > > see if I can change them all.
> > > > 
> > > > OK, feel free to reach out with any questions. I'll be around for
another
> > hour or two.
> > > 
> > > Thanks Daniel.  I have created https://codereview.chromium.org/2645823002
and
> > I will delete this change.
> > 
> > Daniel, could we got back to this approach?
> 
> Doesn't that CL just need to do a null check for frame then in
PlatformEventController? e.g. frame ? frame->page() : nullptr

Yes, that fixes things.  Going back to
https://codereview.chromium.org/2645823002, and I will close this change.

Powered by Google App Engine
This is Rietveld 408576698