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

Issue 1113393004: OOPIF: Specify previous sibling frames when creating new RenderFrames. (Closed)

Created:
5 years, 7 months ago by alexmos
Modified:
5 years, 7 months ago
Reviewers:
nasko, dcheng
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, 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

OOPIF: Specify previous sibling frames when creating RenderFrames. When initializing a new renderer for an OOP frame, the current behavior is to first create all the RenderFrameProxies, and then to create the new RenderFrame, appending it as its parent's last child in the frame tree. This disregards the order of sibling frames and thus may break indexed window access (e.g., window.frames[2]). This CL passes the previous sibling's routing ID in the FrameMsg_NewFrame message, so that the new frame can be inserted in the correct place in the frame tree. Note that we don't need to do this for RenderFrameProxies, as those are already created in the correct order (by CreateProxiesForSiteInstance) when initializing a new renderer process. Corresponding Blink CL: https://codereview.chromium.org/1119823003/ BUG=478792 Committed: https://crrev.com/134cdb8c234847ebde156e46cad95be3221dc66b Cr-Commit-Position: refs/heads/master@{#328384}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 25

Patch Set 4 : Address Nasko's comments #

Total comments: 2

Patch Set 5 : Add TODOs and fix comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+275 lines, -102 lines) Patch
M content/browser/frame_host/frame_tree_node.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_node.cc View 1 1 chunk +13 lines, -0 lines 0 comments Download
M content/browser/frame_host/frame_tree_unittest.cc View 1 1 chunk +24 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 2 chunks +15 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 2 chunks +19 lines, -3 lines 0 comments Download
M content/browser/site_per_process_browsertest.cc View 1 2 3 4 5 chunks +135 lines, -52 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 2 chunks +31 lines, -13 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 1 chunk +8 lines, -6 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 2 chunks +9 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_thread_impl.h View 2 chunks +2 lines, -6 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 1 chunk +5 lines, -8 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
alexmos
Nasko, can you please review this CL for fixing the indexed frame access? This also ...
5 years, 7 months ago (2015-05-01 22:32:49 UTC) #2
nasko
Great start! A few comments, though mostly nits. https://codereview.chromium.org/1113393004/diff/40001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1113393004/diff/40001/content/browser/frame_host/render_frame_host_manager.cc#newcode1663 content/browser/frame_host/render_frame_host_manager.cc:1663: // ...
5 years, 7 months ago (2015-05-04 17:16:56 UTC) #3
alexmos
https://codereview.chromium.org/1113393004/diff/40001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1113393004/diff/40001/content/browser/frame_host/render_frame_host_manager.cc#newcode1663 content/browser/frame_host/render_frame_host_manager.cc:1663: // At point, all RenderFrameProxies for sibling frames have ...
5 years, 7 months ago (2015-05-04 21:18:04 UTC) #4
nasko
LGTM, provided you fix some of the wording on the IPC struct. https://codereview.chromium.org/1113393004/diff/40001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc ...
5 years, 7 months ago (2015-05-04 22:02:13 UTC) #5
alexmos
https://codereview.chromium.org/1113393004/diff/40001/content/browser/site_per_process_browsertest.cc File content/browser/site_per_process_browsertest.cc (right): https://codereview.chromium.org/1113393004/diff/40001/content/browser/site_per_process_browsertest.cc#newcode2168 content/browser/site_per_process_browsertest.cc:2168: EXPECT_TRUE(WaitForRenderFrameReady(child0->current_frame_host())); On 2015/05/04 22:02:13, nasko wrote: > On 2015/05/04 ...
5 years, 7 months ago (2015-05-04 22:12:01 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1113393004/80001
5 years, 7 months ago (2015-05-05 18:00:04 UTC) #9
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-05 19:26:12 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1113393004/80001
5 years, 7 months ago (2015-05-05 19:44:39 UTC) #13
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 7 months ago (2015-05-05 19:50:42 UTC) #14
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/134cdb8c234847ebde156e46cad95be3221dc66b Cr-Commit-Position: refs/heads/master@{#328384}
5 years, 7 months ago (2015-05-05 19:51:39 UTC) #15
piman
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/1118083004/ by piman@chromium.org. ...
5 years, 7 months ago (2015-05-05 22:28:23 UTC) #16
dcheng
The "leak" appears to be another case of symbolization not always being reliable. The leaking ...
5 years, 7 months ago (2015-05-05 22:35:11 UTC) #18
dcheng
5 years, 7 months ago (2015-05-05 22:36:03 UTC) #19
Message was sent while issue was closed.
On 2015/05/05 at 22:35:11, dcheng wrote:
> The "leak" appears to be another case of symbolization not always being
reliable. The leaking stack is:
> 
> 
> ==22350==ERROR: LeakSanitizer: detected memory leaks
> 
> Direct leak of 64 byte(s) in 1 object(s) allocated from:
>     #0 0x4dc86b in __interceptor_malloc
(/tmp/run_tha_testoNK3I1/out/Release/content_browsertests+0x4dc86b)
>     #1 0x3d5d120 in partitionAllocGenericFlags
third_party/WebKit/Source/wtf/PartitionAlloc.h:569:20
>     #2 0x3d5d120 in partitionAllocGeneric
third_party/WebKit/Source/wtf/PartitionAlloc.h:585
>     #3 0x3d5d120 in WTF::fastMalloc(unsigned long)
third_party/WebKit/Source/wtf/FastMalloc.cpp:56
>     #4 0x77ef527 in operator new
third_party/WebKit/Source/wtf/RefCounted.h:166:5
>     #5 0x77ef527 in blink::ScriptState::create(v8::Local<v8::Context>,
WTF::PassRefPtr<blink::DOMWrapperWorld>)
third_party/WebKit/Source/bindings/core/v8/ScriptState.cpp:17
>     #6 0x7877626 in blink::WindowProxy::createContext()
third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:303:21
>     #7 0x78760e6 in blink::WindowProxy::initialize()
third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:223:5
>     #8 0x7875c74 in initializeIfNeeded
third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:209:19
>     #9 0x7875c74 in blink::WindowProxy::takeGlobalFrom(blink::WindowProxy*)
third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp:165
>     #10 0x787cf70 in
blink::WindowProxyManager::takeGlobalFrom(blink::WindowProxyManager*)
third_party/WebKit/Source/bindings/core/v8/WindowProxyManager.cpp:88:5
>     #11 0x4dd87c8 in blink::WebFrame::swap(blink::WebFrame*)
third_party/WebKit/Source/web/WebFrame.cpp:106:5
>     #12 0xd9aff6 in content::RenderFrameImpl::OnSwapOut(int, bool,
content::FrameReplicationState const&)
content/renderer/render_frame_impl.cc:1224:7
>     #13 0xa18bb1 in content::RenderFrameImplTest::SetUp()
content/renderer/render_frame_impl_browsertest.cc:49:5
>     #14 0x17a3fb3 in HandleExceptionsInMethodIfSupported<testing::Test, void>
testing/gtest/src/gtest.cc:2420:12
>     #15 0x17a3fb3 in testing::Test::Run() testing/gtest/src/gtest.cc:2432
>     #16 0x17a615d in testing::TestInfo::Run()
testing/gtest/src/gtest.cc:2612:5
>     #17 0x17a6eda in testing::TestCase::Run()
testing/gtest/src/gtest.cc:2730:5
>     #18 0x17bad33 in testing::internal::UnitTestImpl::RunAllTests()
testing/gtest/src/gtest.cc:4602:11
>     #19 0x17ba38b in
HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>
testing/gtest/src/gtest.cc:2420:12
>     #20 0x17ba38b in testing::UnitTest::Run() testing/gtest/src/gtest.cc:4220
>     #21 0x1423dea in RUN_ALL_TESTS testing/gtest/include/gtest/gtest.h:2326:10
>     #22 0x1423dea in base::TestSuite::Run() base/test/test_suite.cc:228
>     #23 0x1232ed5 in content::ContentTestLauncherDelegate::RunTestSuite(int,
char**) content/test/content_test_launcher.cc:102:12
>     #24 0x13d91b6 in content::LaunchTests(content::TestLauncherDelegate*, int,
int, char**) content/public/test/test_launcher.cc:475:12
>     #25 0x1232dab in main content/test/content_test_launcher.cc:129:10
>     #26 0x7f11f178676c in __libc_start_main
/build/buildd/eglibc-2.15/csu/libc-start.c:226
> 
> We have a leak suppression for blink::WindowProxy::initializeIfNeeded... but
stack #8 is symbolized to initializeIfNeeded.

I've already filed a bug for the symbolization issue: https://crbug.com/484760.
In the meantime, we'll need to check in a broader suppression though =(

Powered by Google App Engine
This is Rietveld 408576698