Skip to content

Commit

Permalink
browser(firefox): do not complain about SnapshotListener being cleare…
Browse files Browse the repository at this point in the history
…d on Destroy (#3298)
  • Loading branch information
yury-s authored Aug 5, 2020
1 parent 9ec0267 commit 7e28c26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions browser_patches/firefox/BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1150
Changed: [email protected] Mon Aug 3 19:37:50 PDT 2020
1151
Changed: [email protected] Tue Aug 4 16:50:29 PDT 2020
7 changes: 4 additions & 3 deletions browser_patches/firefox/patches/bootstrap.diff
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,7 @@ index 7f91de9e67d7ffa02de3eef1d760e5cfd05e7ad6..37b0320f3bde99ef7635c71452a3a4b7

} // namespace widget
diff --git a/widget/headless/HeadlessWidget.cpp b/widget/headless/HeadlessWidget.cpp
index 7589d8a1a886dab5431e423d20f7d0aa19c2af75..b14925a7b6972c120a59f70fbbe70a1145a5cb4e 100644
index 7589d8a1a886dab5431e423d20f7d0aa19c2af75..05c79e0d5ee58c45a75b55a65423466be11596fa 100644
--- a/widget/headless/HeadlessWidget.cpp
+++ b/widget/headless/HeadlessWidget.cpp
@@ -104,6 +104,8 @@ void HeadlessWidget::Destroy() {
Expand All @@ -2100,13 +2100,14 @@ index 7589d8a1a886dab5431e423d20f7d0aa19c2af75..b14925a7b6972c120a59f70fbbe70a11
nsBaseWidget::OnDestroy();

nsBaseWidget::Destroy();
@@ -499,5 +501,13 @@ nsresult HeadlessWidget::SynthesizeNativeTouchPoint(
@@ -499,5 +501,14 @@ nsresult HeadlessWidget::SynthesizeNativeTouchPoint(
return NS_OK;
}

+void HeadlessWidget::SetSnapshotListener(SnapshotListener&& listener) {
+ if (!mCompositorWidget) {
+ fprintf(stderr, "Trying to set SnapshotListener without compositor widget\n");
+ if (listener)
+ fprintf(stderr, "Trying to set SnapshotListener without compositor widget\n");
+ return;
+ }
+ mCompositorWidget->SetSnapshotListener(std::move(listener));
Expand Down

0 comments on commit 7e28c26

Please sign in to comment.