Skip to content

Commit

Permalink
Apply raw_ptr usage in patch files (see #3239)
Browse files Browse the repository at this point in the history
  • Loading branch information
magreenblatt committed May 11, 2024
1 parent 00118dd commit 2156c9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions patch/patches/extensions_1947.patch
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ index 5a0ba568bf30c..8ef4be85e038a 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);

diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index 28ba09319b047..2a097a5ae4c16 100644
index 28ba09319b047..92a52d2056b73 100644
--- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h
@@ -62,6 +62,12 @@ class ExtensionHost : public DeferredStartRenderHost,
Expand Down Expand Up @@ -167,7 +167,7 @@ index 28ba09319b047..2a097a5ae4c16 100644
// The host for our HTML content.
- std::unique_ptr<content::WebContents> host_contents_;
+ std::unique_ptr<content::WebContents> host_contents_owned_;
+ content::WebContents* host_contents_;
+ raw_ptr<content::WebContents> host_contents_;

// A pointer to the current or speculative main frame in `host_contents_`. We
// can't access this frame through the `host_contents_` directly as it does
Expand Down
9 changes: 6 additions & 3 deletions patch/patches/osr_fling_2745.patch
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ index b3218a69a1d9e..a7b8e6c20659a 100644
RenderWidgetHostViewBase* GetRenderWidgetHostViewBase();

diff --git content/common/input/fling_scheduler_base.h content/common/input/fling_scheduler_base.h
index e8ee63f3abc2e..2d1717082759d 100644
index e8ee63f3abc2e..765ea358e093a 100644
--- content/common/input/fling_scheduler_base.h
+++ content/common/input/fling_scheduler_base.h
@@ -7,12 +7,23 @@
@@ -5,14 +5,26 @@
#ifndef CONTENT_COMMON_INPUT_FLING_SCHEDULER_BASE_H_
#define CONTENT_COMMON_INPUT_FLING_SCHEDULER_BASE_H_

+#include "base/memory/raw_ptr.h"
#include "content/common/input/fling_controller.h"

+namespace ui {
Expand All @@ -64,7 +67,7 @@ index e8ee63f3abc2e..2d1717082759d 100644
+ }
+
+protected:
+ ui::Compositor* compositor_ = nullptr;
+ raw_ptr<ui::Compositor> compositor_ = nullptr;
};

} // namespace content
Expand Down
4 changes: 2 additions & 2 deletions patch/patches/viz_osr_2575.patch
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ index 2f462f0deb5fc..695869b83cefa 100644
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index 9019859a51edf..ed88b61c6dd69 100644
index 9019859a51edf..636dd2a822812 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -33,7 +33,9 @@
Expand Down Expand Up @@ -265,7 +265,7 @@ index 9019859a51edf..ed88b61c6dd69 100644
simple_begin_frame_observers_;
std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;

+ CompositorDelegate* delegate_ = nullptr;
+ raw_ptr<CompositorDelegate> delegate_ = nullptr;
+
// The root of the Layer tree drawn by this compositor.
raw_ptr<Layer> root_layer_ = nullptr;
Expand Down

0 comments on commit 2156c9f

Please sign in to comment.