Commit f3d07b7a authored by Eric Karl's avatar Eric Karl Committed by Commit Bot

Fix In-process content browsertests for Viz

Many of our current issues turned out to be due to missing shutdown
logic which caused the GPU thread to shutdown before the compositor,
leading to a number of DCHECKs, and a hang if those were removed.

This change allows the CompositorImpl to tear down before the GPU proc.

Bug: 851643
Change-Id: Ieb96da9b7132e4ccf8ebf71dc0ee920bfbeb4217
Reviewed-on: https://chromium-review.googlesource.com/1115875Reviewed-by: default avatarTed Choc <tedchoc@chromium.org>
Commit-Queue: Eric Karl <ericrk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570880}
parent dbeb3357
...@@ -126,12 +126,19 @@ public class ShellManager extends FrameLayout { ...@@ -126,12 +126,19 @@ public class ShellManager extends FrameLayout {
/** /**
* Destroys the Shell manager and associated components. * Destroys the Shell manager and associated components.
* Always called at activity exit, and potentially called by native in cases where we need to
* control the timing of mContentViewRenderView destruction. Must handle being called twice.
*/ */
@CalledByNative
public void destroy() { public void destroy() {
// Remove active shell (Currently single shell support only available). // Remove active shell (Currently single shell support only available).
removeShell(mActiveShell); if (mActiveShell != null) {
mContentViewRenderView.destroy(); removeShell(mActiveShell);
mContentViewRenderView = null; }
if (mContentViewRenderView != null) {
mContentViewRenderView.destroy();
mContentViewRenderView = null;
}
} }
private static native void nativeInit(Object shellManagerInstance); private static native void nativeInit(Object shellManagerInstance);
......
...@@ -65,4 +65,9 @@ void JNI_ShellManager_LaunchShell(JNIEnv* env, ...@@ -65,4 +65,9 @@ void JNI_ShellManager_LaunchShell(JNIEnv* env,
gfx::Size()); gfx::Size());
} }
void DestroyShellManager() {
JNIEnv* env = base::android::AttachCurrentThread();
Java_ShellManager_destroy(env, g_global_state.Get().j_shell_manager);
}
} // namespace content } // namespace content
...@@ -29,6 +29,11 @@ void RemoveShellView(const base::android::JavaRef<jobject>& shell_view); ...@@ -29,6 +29,11 @@ void RemoveShellView(const base::android::JavaRef<jobject>& shell_view);
void ShellAttachLayer(cc::Layer* layer); void ShellAttachLayer(cc::Layer* layer);
void ShellRemoveLayer(cc::Layer* layer); void ShellRemoveLayer(cc::Layer* layer);
// Destroys the ShellManager on app exit. Must not use the above functions
// after this is called.
void DestroyShellManager();
} // namespace content } // namespace content
#endif // CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_ #endif // CONTENT_SHELL_ANDROID_SHELL_MANAGER_H_
...@@ -27,6 +27,7 @@ void Shell::PlatformInitialize(const gfx::Size& default_window_size) { ...@@ -27,6 +27,7 @@ void Shell::PlatformInitialize(const gfx::Size& default_window_size) {
} }
void Shell::PlatformExit() { void Shell::PlatformExit() {
DestroyShellManager();
} }
void Shell::PlatformCleanUp() { void Shell::PlatformCleanUp() {
......
# Android Failures # Android Failures
# TODO(jonross): Triage these
-ContentBrowserTestSanityTest.SingleProcess
-DomSerializerTests.SerializeHTMLDOMWithAddingMOTW
-DomSerializerTests.SerializeHTMLDOMWithBaseTag
-DomSerializerTests.SerializeHTMLDOMWithEmptyHead
-DomSerializerTests.SerializeHTMLDOMWithEntitiesInAttributeValue
-DomSerializerTests.SerializeHTMLDOMWithEntitiesInText
-DomSerializerTests.SerializeHTMLDOMWithNonStandardEntities
-DomSerializerTests.SerializeHTMLDOMWithoutDocType
-DomSerializerTests.SerializeXMLDocWithBuiltInEntities
-DomSerializerTests.SubResourceForElementsInNonHTMLNamespace
-IndexedDBBrowserTestSingleProcess.RenderThreadShutdownTest
-RenderThreadImplDiscardableMemoryBrowserTest.DiscardableMemoryAddressSpace
-RenderThreadImplDiscardableMemoryBrowserTest.LockDiscardableMemory
-RenderThreadImplDiscardableMemoryBrowserTest.ReleaseFreeDiscardableMemory
-RenderThreadImplDiscardableMemoryBrowserTest.ReleaseFreeMemory
-RenderViewBrowserTest.ConfirmCacheInformationPlumbed
-ResourceFetcherTests.ResourceFetcher404
-ResourceFetcherTests.ResourceFetcherDeletedInCallback
-ResourceFetcherTests.ResourceFetcherDidFail
-ResourceFetcherTests.ResourceFetcherDownload
-ResourceFetcherTests.ResourceFetcherPost
-ResourceFetcherTests.ResourceFetcherRedirect
-ResourceFetcherTests.ResourceFetcherSetHeader
-ResourceFetcherTests.ResourceFetcherTimeout
-SavableResourcesTest.GetSavableResourceLinksWithPageHasInvalidLinks
-SavableResourcesTest.GetSavableResourceLinksWithPageHasValidLinks
-SavableResourcesTest.GetSavableResourceLinksWithPageHasValidStyleLink
-SingleProcessMemoryTracingTest.BrowserInitiatedSingleDump
-SingleProcessMemoryTracingTest.ManyInterleavedDumps
-SingleProcessMemoryTracingTest.RendererInitiatedSingleDump
# GL initiazation failures. https://crbug.com/855554 # GL initiazation failures. https://crbug.com/855554
-P/CompositorImplLowEndBrowserTest.CompositorImplDropsResourcesOnBackground/0 -P/CompositorImplLowEndBrowserTest.CompositorImplDropsResourcesOnBackground/0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment