summaryrefslogtreecommitdiff
blob: 5070135c61175d2d431681c49039d4c01d862c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
https://chromium.googlesource.com/chromium/src/+/a1fec6273f3ad7c73b35bb420a5540355df35b74
controlledframe: Fix start up crash

This commit applies a fix from mail@maciej.szmigiero.name to prevent a
null reference error in GetControlledFrameFeatureList(). The fix is to
add static to `feature_list` so that the object lives past this
function.

BUG=1447422

Change-Id: I22879831ec879ce7d6a178760540f88106b3ded4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4555985
Commit-Queue: Ovidio Ruiz-Henríquez <odejesush@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Chase Phillips <cmp@chromium.org>
Auto-Submit: Ovidio Ruiz-Henríquez <odejesush@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1149296}

--- a/chrome/common/initialize_extensions_client.cc
+++ b/chrome/common/initialize_extensions_client.cc

@@ -19,7 +19,7 @@
 
 // This list should stay in sync with GetExpectedDelegatedFeaturesForTest().
 base::span<const char* const> GetControlledFrameFeatureList() {
-  constexpr const char* feature_list[] = {
+  static constexpr const char* feature_list[] = {
       "controlledFrameInternal", "chromeWebViewInternal", "guestViewInternal",
       "webRequestInternal",      "webViewInternal",
   };