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

Issue 1901023003: Introduce browser side FrameTreeNodeBlameContext (Closed)

Created:
4 years, 8 months ago by Xiaocheng
Modified:
4 years, 7 months ago
Reviewers:
clamy, benjhayden, Sami
CC:
chromium-reviews, creis+watch_chromium.org, Charlie Reis, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce browser side FrameTreeNodeBlameContext This patch introduces a new class |FrameTreeNodeBlameContext|, which is a subclass of |BlameContext|, that maintains the snapshots of browser side frame tree nodes, and enables automatic dumping of the frame tree at browser side when tracing starts. This patch also removes the |TracedFrameTreeNode| class because its functionality is subsumed by |FrameTreeNodeBlameContext|. Some of the logic of the former class is moved into the latter. BUG=546021 TEST=content_unittests --gtest_filter=FrameTreeNodeBlameContextTest.* CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation

Patch Set 1 #

Total comments: 11

Patch Set 2 : Revised the comments slightly #

Total comments: 7

Patch Set 3 : Add locking and documentation #

Total comments: 2

Patch Set 4 : Fix locking and add unit test #

Patch Set 5 : Rebase #

Patch Set 6 : Fix compile error #

Total comments: 1

Patch Set 7 : Remove thread safety handling (and its doc) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+474 lines, -130 lines) Patch
M content/browser/frame_host/frame_tree.cc View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/frame_host/frame_tree_node.h View 1 2 3 chunks +15 lines, -2 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 2 7 chunks +16 lines, -20 lines 0 comments Download
A content/browser/frame_host/frame_tree_node_blame_context.h View 1 2 3 4 5 6 1 chunk +65 lines, -0 lines 0 comments Download
A content/browser/frame_host/frame_tree_node_blame_context.cc View 1 2 3 4 5 6 1 chunk +72 lines, -0 lines 0 comments Download
A content/browser/frame_host/frame_tree_node_blame_context_unittest.cc View 1 2 3 4 5 1 chunk +300 lines, -0 lines 0 comments Download
D content/browser/frame_host/traced_frame_tree_node.h View 1 chunk +0 lines, -36 lines 0 comments Download
D content/browser/frame_host/traced_frame_tree_node.cc View 1 chunk +0 lines, -69 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 35 (9 generated)
benjhayden
Thanks! This looks like a neat idea that might simplify some things and enable some ...
4 years, 8 months ago (2016-04-20 01:37:34 UTC) #5
Xiaocheng
Thanks for the review (which is fast)! https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node.cc#newcode148 content/browser/frame_host/frame_tree_node.cc:148: child->InitializeBlameContext(); One ...
4 years, 8 months ago (2016-04-20 02:01:05 UTC) #6
benjhayden
Sami, where is the FrameBlameContext deleted?
4 years, 8 months ago (2016-04-20 02:16:17 UTC) #8
Xiaocheng
A note for something I just found: FrameBlameContext::TakeSnapshot() is also called on multiple threads -- ...
4 years, 8 months ago (2016-04-20 03:13:57 UTC) #9
Xiaocheng
I have thought about the threading issue of BlameContext. Currently there are two types of ...
4 years, 8 months ago (2016-04-20 06:36:18 UTC) #10
Xiaocheng
Now I understand what "a can of architectural worms" (quoted from https://codereview.chromium.org/1775953003#msg10) means. Fixing the ...
4 years, 8 months ago (2016-04-20 09:42:16 UTC) #11
Sami
On 2016/04/20 02:16:17, benjhayden_chromium wrote: > Sami, where is the FrameBlameContext deleted? Sorry, this was ...
4 years, 8 months ago (2016-04-20 12:10:03 UTC) #12
Sami
Thanks for working on this patch! https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node.cc File content/browser/frame_host/frame_tree_node.cc (right): https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node.cc#newcode148 content/browser/frame_host/frame_tree_node.cc:148: child->InitializeBlameContext(); On 2016/04/20 ...
4 years, 8 months ago (2016-04-20 12:15:08 UTC) #13
Charlie Reis
Drive-by: This class is surprising to me, since it doesn't explain much about how it ...
4 years, 8 months ago (2016-04-20 16:58:58 UTC) #15
benjhayden
https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node_blame_context.cc File content/browser/frame_host/frame_tree_node_blame_context.cc (right): https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node_blame_context.cc#newcode62 content/browser/frame_host/frame_tree_node_blame_context.cc:62: void FrameTreeNodeBlameContext::AsValueInto( On 2016/04/20 at 12:15:08, Sami wrote: > ...
4 years, 8 months ago (2016-04-20 17:29:45 UTC) #16
Xiaocheng
Done with thread safety and documentation. https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node_blame_context.cc File content/browser/frame_host/frame_tree_node_blame_context.cc (right): https://codereview.chromium.org/1901023003/diff/1/content/browser/frame_host/frame_tree_node_blame_context.cc#newcode62 content/browser/frame_host/frame_tree_node_blame_context.cc:62: void FrameTreeNodeBlameContext::AsValueInto( On ...
4 years, 8 months ago (2016-04-21 08:01:32 UTC) #17
Xiaocheng
I'm still working on designing some FrameTreeNodeBlameContextTest. Due to my limited experience, the first issue ...
4 years, 8 months ago (2016-04-21 10:48:18 UTC) #18
benjhayden
https://codereview.chromium.org/1901023003/diff/40001/content/browser/frame_host/frame_tree_node_blame_context.cc File content/browser/frame_host/frame_tree_node_blame_context.cc (right): https://codereview.chromium.org/1901023003/diff/40001/content/browser/frame_host/frame_tree_node_blame_context.cc#newcode35 content/browser/frame_host/frame_tree_node_blame_context.cc:35: process_id_ = -1; lock?
4 years, 8 months ago (2016-04-22 20:34:15 UTC) #19
Charlie Reis
Thanks for the docs! That resolves my concern. Moving myself to CC, unless you need ...
4 years, 8 months ago (2016-04-22 21:10:40 UTC) #21
Xiaocheng
https://codereview.chromium.org/1901023003/diff/40001/content/browser/frame_host/frame_tree_node_blame_context.cc File content/browser/frame_host/frame_tree_node_blame_context.cc (right): https://codereview.chromium.org/1901023003/diff/40001/content/browser/frame_host/frame_tree_node_blame_context.cc#newcode35 content/browser/frame_host/frame_tree_node_blame_context.cc:35: process_id_ = -1; On 2016/04/22 at 20:34:15, benjhayden_chromium wrote: ...
4 years, 8 months ago (2016-04-25 00:56:28 UTC) #22
Xiaocheng
PTAL at Patch 4, which seems landable to me.
4 years, 8 months ago (2016-04-25 07:06:42 UTC) #25
Xiaocheng
Sorry, PTAL at Patch 6.
4 years, 8 months ago (2016-04-25 13:15:03 UTC) #26
Sami
Thanks for the patch. One way that we could make this simpler would be to ...
4 years, 7 months ago (2016-04-25 19:28:50 UTC) #27
benjhayden
On 2016/04/25 at 19:28:50, skyostil wrote: > Thanks for the patch. One way that we ...
4 years, 7 months ago (2016-04-25 19:40:18 UTC) #28
benjhayden
lgtm
4 years, 7 months ago (2016-04-25 19:45:08 UTC) #29
Xiaocheng
On 2016/04/25 at 19:28:50, skyostil wrote: > Thanks for the patch. One way that we ...
4 years, 7 months ago (2016-04-26 02:19:25 UTC) #30
Xiaocheng
I should have noticed the revert of making RenderFrameImpl owning FrameBlameContext earlier: https://codereview.chromium.org/1909403002. Since this ...
4 years, 7 months ago (2016-04-26 07:58:02 UTC) #31
Sami
On 2016/04/26 07:58:02, Xiaocheng wrote: > I should have noticed the revert of making RenderFrameImpl ...
4 years, 7 months ago (2016-04-26 10:33:18 UTC) #32
Xiaocheng
On 2016/04/26 at 10:33:18, skyostil wrote: > On 2016/04/26 07:58:02, Xiaocheng wrote: > > I ...
4 years, 7 months ago (2016-04-26 11:58:07 UTC) #33
dcheng
Drive-by. https://codereview.chromium.org/1901023003/diff/100001/content/browser/frame_host/frame_tree_node_blame_context.h File content/browser/frame_host/frame_tree_node_blame_context.h (right): https://codereview.chromium.org/1901023003/diff/100001/content/browser/frame_host/frame_tree_node_blame_context.h#newcode58 content/browser/frame_host/frame_tree_node_blame_context.h:58: FrameTreeNodeBlameContext(FrameTreeNode* node); Nit: explicit
4 years, 7 months ago (2016-04-26 20:06:29 UTC) #34
Xiaocheng
4 years, 7 months ago (2016-05-13 02:58:21 UTC) #35
Closing this CL because it is stale after the landing of
AsyncEnabledStateObserver.

It will be replaced by a new CL for the same purpose.

Powered by Google App Engine
This is Rietveld 408576698