fix: avoid double free when destroying WebContents (#31104)
This commit is contained in:
parent
1a6a8f55af
commit
2360012cad
2 changed files with 18 additions and 2 deletions
|
@ -451,6 +451,9 @@ class WebContents : public gin::Wrappable<WebContents>,
|
|||
WebContents(v8::Isolate* isolate, const gin_helper::Dictionary& options);
|
||||
~WebContents() override;
|
||||
|
||||
// Delete this if garbage collection has not started.
|
||||
void DeleteThisIfAlive();
|
||||
|
||||
// Creates a InspectableWebContents object and takes ownership of
|
||||
// |web_contents|.
|
||||
void InitWithWebContents(std::unique_ptr<content::WebContents> web_contents,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue