fix: don't invoke callback after FrameSubscriber is destroyed (#13657)
This commit is contained in:
parent
ffc15e02a6
commit
77ca5b7d64
2 changed files with 6 additions and 2 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "content/public/browser/web_contents.h"
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "components/viz/common/frame_sinks/copy_output_result.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
@ -39,6 +40,8 @@ class FrameSubscriber : public content::WebContentsObserver {
|
|||
FrameCaptureCallback callback_;
|
||||
bool only_dirty_;
|
||||
|
||||
base::WeakPtrFactory<FrameSubscriber> weak_ptr_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(FrameSubscriber);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue