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

Issue 1408743005: Properly recreate swapped out RenderView. (Closed)

Created:
5 years, 2 months ago by nasko
Modified:
5 years, 2 months ago
Reviewers:
Charlie Reis, alexmos
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, creis+watch_chromium.org, darin-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Properly recreate swapped out RenderView. This CL fixes how RenderView is recreated after a process crash. Due to not recreating the RenderFrameProxy in the case the RenderView is swapped out, the WebView ends up with no mainFrame() and crashes in various ways. BUG=357747, 544271 Committed: https://crrev.com/ae13c59638df3adf7c9a206f82680faf86d52310 Cr-Commit-Position: refs/heads/master@{#354658}

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : Clear main RFH on cancelling the pending RFH. #

Total comments: 14

Patch Set 4 : A different approach. #

Total comments: 9

Patch Set 5 : Fixes based on Charlie's review. #

Total comments: 1

Patch Set 6 : Fix formatting. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -26 lines) Patch
M content/browser/frame_host/render_frame_host_manager.h View 1 2 3 4 1 chunk +5 lines, -6 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 11 chunks +17 lines, -20 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager_browsertest.cc View 1 2 3 4 5 1 chunk +43 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
Charlie Reis
Not sure I totally understand this yet. Could you post a bit of an explanation ...
5 years, 2 months ago (2015-10-16 17:02:24 UTC) #2
nasko
I've rewritten the fix and improved the test readability. The test itself should be good ...
5 years, 2 months ago (2015-10-16 22:17:38 UTC) #3
nasko
Ok, I understand now that the tests are actually passing, I forgot to look at ...
5 years, 2 months ago (2015-10-16 22:32:32 UTC) #4
Charlie Reis
LGTM with some nits and a fix for the test. Might want Alex to confirm ...
5 years, 2 months ago (2015-10-16 23:09:58 UTC) #6
nasko
Fixed! https://codereview.chromium.org/1408743005/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1408743005/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode2007 content/browser/frame_host/render_frame_host_manager.cc:2007: DCHECK_EQ(render_view_host->is_active(), !proxy); On 2015/10/16 23:09:57, Charlie Reis wrote: ...
5 years, 2 months ago (2015-10-16 23:42:09 UTC) #7
alexmos
LGTM https://codereview.chromium.org/1408743005/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1408743005/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode2036 content/browser/frame_host/render_frame_host_manager.cc:2036: if (proxy) On 2015/10/16 23:42:09, nasko (slow to ...
5 years, 2 months ago (2015-10-16 23:54:17 UTC) #8
nasko
Fixed formatting. Was due to adding EXPECT_TRUE after running git cl format.
5 years, 2 months ago (2015-10-16 23:56:25 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408743005/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408743005/100001
5 years, 2 months ago (2015-10-16 23:57:27 UTC) #12
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 2 months ago (2015-10-17 01:07:13 UTC) #13
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/ae13c59638df3adf7c9a206f82680faf86d52310 Cr-Commit-Position: refs/heads/master@{#354658}
5 years, 2 months ago (2015-10-17 01:08:07 UTC) #14
Reilly Grant (use Gerrit)
5 years, 2 months ago (2015-10-19 21:15:21 UTC) #15
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in
https://codereview.chromium.org/1412333002/ by reillyg@chromium.org.

The reason for reverting is: This appears to be causing a set of two memory
leaks on the Webkit Linux Valgrind bots:

22,008 (48 direct, 21,960 indirect) bytes in 1 blocks are definitely lost in
loss record 2,955 of 2,972
operator new(unsigned long) (m_replacemalloc/vg_replace_malloc.c:1140)
content::RenderProcessHostImpl::Init()
(content/browser/renderer_host/render_process_host_impl.cc:710)
content::RenderFrameHostManager::InitRenderView(content::RenderViewHostImpl*,
content::RenderFrameProxyHost*)
(content/browser/frame_host/render_frame_host_manager.cc:1995)
content::RenderFrameHostManager::Navigate(GURL const&,
content::FrameNavigationEntry const&, content::NavigationEntryImpl const&)
(content/browser/frame_host/render_frame_host_manager.cc:421)
content::NavigatorImpl::NavigateToEntry(content::FrameTreeNode*,
content::FrameNavigationEntry const&, content::NavigationEntryImpl const&,
content::NavigationController::ReloadType, bool)
(content/browser/frame_host/navigator_impl.cc:312)
content::NavigatorImpl::NavigateToPendingEntry(content::FrameTreeNode*,
content::FrameNavigationEntry const&, content::NavigationController::ReloadType,
bool)
(/b/build/slave/webkit-rel-linux-valgrind-layout/build/src/out/Release/content_shell)
content::NavigationControllerImpl::NavigateToPendingEntryInternal(content::NavigationController::ReloadType)
(content/browser/frame_host/navigation_controller_impl.cc:1785)
content::NavigationControllerImpl::NavigateToPendingEntry(content::NavigationController::ReloadType)
(content/browser/frame_host/navigation_controller_impl.cc:1762)
content::NavigationControllerImpl::LoadEntry(scoped_ptr<content::NavigationEntryImpl,
base::DefaultDeleter<content::NavigationEntryImpl> >)
(content/browser/frame_host/navigation_controller_impl.cc:430)
content::NavigationControllerImpl::LoadURLWithParams(content::NavigationController::LoadURLParams
const&) (content/browser/frame_host/navigation_controller_impl.cc:795)
content::Shell::LoadURLForFrame(GURL const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
(content/shell/browser/shell.cc:190)
content::Shell::LoadURL(GURL const&) (content/shell/browser/shell.cc:182)
content::BlinkTestController::PrepareForLayoutTest(GURL const&, base::FilePath
const&, bool, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
(content/shell/browser/blink_test_controller.cc:274)
(anonymous namespace)::RunOneTest(test_runner::TestInfo const&, bool*,
scoped_ptr<content::BrowserMainRunner,
base::DefaultDeleter<content::BrowserMainRunner> > const&)
(content/shell/browser/layout_test/layout_test_browser_main.cc:40)
(anonymous namespace)::RunTests(scoped_ptr<content::BrowserMainRunner,
base::DefaultDeleter<content::BrowserMainRunner> > const&)
(content/shell/browser/layout_test/layout_test_browser_main.cc:87)
LayoutTestBrowserMain(content::MainFunctionParams const&,
scoped_ptr<content::BrowserMainRunner,
base::DefaultDeleter<content::BrowserMainRunner> > const&)
(content/shell/browser/layout_test/layout_test_browser_main.cc:141)
content::ShellMainDelegate::RunProcess(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
content::MainFunctionParams const&)
(content/shell/app/shell_main_delegate.cc:271)
content::RunNamedProcessTypeMain(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, content::MainFunctionParams const&,
content::ContentMainDelegate*) (content/app/content_main_runner.cc:365)
content::ContentMainRunnerImpl::Run() (content/app/content_main_runner.cc:798)
content::ContentMain(content::ContentMainParams const&)
(content/app/content_main.cc:19)

48 (40 direct, 8 indirect) bytes in 1 blocks are definitely lost in loss record
1,603 of 2,979
operator new(unsigned long) (m_replacemalloc/vg_replace_malloc.c:1140)
content::PushMessagingMessageFilter::PushMessagingMessageFilter(int,
content::ServiceWorkerContextWrapper*)
(content/browser/push_messaging/push_messaging_message_filter.cc:213)
content::RenderProcessHostImpl::CreateMessageFilters()
(content/browser/renderer_host/render_process_host_impl.cc:939)
content::RenderProcessHostImpl::Init()
(content/browser/renderer_host/render_process_host_impl.cc:661)
content::RenderFrameHostManager::InitRenderView(content::RenderViewHostImpl*,
content::RenderFrameProxyHost*)
(content/browser/frame_host/render_frame_host_manager.cc:1995)
content::RenderFrameHostManager::Navigate(GURL const&,
content::FrameNavigationEntry const&, content::NavigationEntryImpl const&)
(content/browser/frame_host/render_frame_host_manager.cc:421)
content::NavigatorImpl::NavigateToEntry(content::FrameTreeNode*,
content::FrameNavigationEntry const&, content::NavigationEntryImpl const&,
content::NavigationController::ReloadType, bool)
(content/browser/frame_host/navigator_impl.cc:312)
content::NavigatorImpl::NavigateToPendingEntry(content::FrameTreeNode*,
content::FrameNavigationEntry const&, content::NavigationController::ReloadType,
bool)
(/b/build/slave/webkit-rel-linux-valgrind-layout/build/src/out/Release/content_shell)
content::NavigationControllerImpl::NavigateToPendingEntryInternal(content::NavigationController::ReloadType)
(content/browser/frame_host/navigation_controller_impl.cc:1785)
content::NavigationControllerImpl::NavigateToPendingEntry(content::NavigationController::ReloadType)
(content/browser/frame_host/navigation_controller_impl.cc:1762)
content::NavigationControllerImpl::LoadEntry(scoped_ptr<content::NavigationEntryImpl,
base::DefaultDeleter<content::NavigationEntryImpl> >)
(content/browser/frame_host/navigation_controller_impl.cc:430)
content::NavigationControllerImpl::LoadURLWithParams(content::NavigationController::LoadURLParams
const&) (content/browser/frame_host/navigation_controller_impl.cc:795)
content::Shell::LoadURLForFrame(GURL const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
(content/shell/browser/shell.cc:190)
content::Shell::LoadURL(GURL const&) (content/shell/browser/shell.cc:182)
content::BlinkTestController::PrepareForLayoutTest(GURL const&, base::FilePath
const&, bool, std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&)
(content/shell/browser/blink_test_controller.cc:274)
(anonymous namespace)::RunOneTest(test_runner::TestInfo const&, bool*,
scoped_ptr<content::BrowserMainRunner,
base::DefaultDeleter<content::BrowserMainRunner> > const&)
(content/shell/browser/layout_test/layout_test_browser_main.cc:40)
(anonymous namespace)::RunTests(scoped_ptr<content::BrowserMainRunner,
base::DefaultDeleter<content::BrowserMainRunner> > const&)
(content/shell/browser/layout_test/layout_test_browser_main.cc:87)
LayoutTestBrowserMain(content::MainFunctionParams const&,
scoped_ptr<content::BrowserMainRunner,
base::DefaultDeleter<content::BrowserMainRunner> > const&)
(content/shell/browser/layout_test/layout_test_browser_main.cc:141)
content::ShellMainDelegate::RunProcess(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&,
content::MainFunctionParams const&)
(content/shell/app/shell_main_delegate.cc:271)
content::RunNamedProcessTypeMain(std::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, content::MainFunctionParams const&,
content::ContentMainDelegate*) (content/app/content_main_runner.cc:365)
content::ContentMainRunnerImpl::Run() (content/app/content_main_runner.cc:798)
content::ContentMain(content::ContentMainParams const&)
(content/app/content_main.cc:19).

Powered by Google App Engine
This is Rietveld 408576698