Commit 63e1360c authored by Thoren Paulson's avatar Thoren Paulson Committed by Commit Bot

[Chromecast] Copy MainFunctionParams instead of storing reference.

On Android, this was a dangling reference, causing crashes at startup.

Bug: internal b/136249537
Test: CQ
Change-Id: I532e45fc2199ef4e4043931fa10088f4df201216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1685687
Commit-Queue: Thoren Paulson <thoren@chromium.org>
Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Auto-Submit: Thoren Paulson <thoren@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676213}
parent daec0f13
......@@ -14,6 +14,7 @@
#include "chromecast/chromecast_buildflags.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_main_parts.h"
#include "content/public/common/main_function_params.h"
#if defined(OS_ANDROID)
#include "base/timer/timer.h"
......@@ -21,10 +22,6 @@
class PrefService;
namespace content {
struct MainFunctionParams;
}
namespace extensions {
class ExtensionsClient;
class ExtensionsBrowserClient;
......@@ -93,7 +90,7 @@ class CastBrowserMainParts : public content::BrowserMainParts {
private:
std::unique_ptr<CastBrowserProcess> cast_browser_process_;
const content::MainFunctionParams& parameters_; // For running browser tests.
const content::MainFunctionParams parameters_; // For running browser tests.
// Caches a pointer of the CastContentBrowserClient.
CastContentBrowserClient* const cast_content_browser_client_ = nullptr;
URLRequestContextFactory* const url_request_context_factory_;
......
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