Dale Curtis would like Jordan Bayles to review this change.
Use InvalidateWeakPtrAndDoom where appropriate in media/
This CL was uploaded by git cl split.
R=jop...@chromium.org
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Dale Curtis would like Frank Liberato to review this change.
Use InvalidateWeakPtrAndDoom where appropriate in media/
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Dale Curtis would like Eugene Zemtsov to review this change.
Use InvalidateWeakPtrAndDoom where appropriate in media/
This CL was uploaded by git cl split.
diff --git a/media/gpu/windows/d3d12_video_encode_accelerator.cc b/media/gpu/windows/d3d12_video_encode_accelerator.cc
index 58ddd46..bca7e9f 100644
--- a/media/gpu/windows/d3d12_video_encode_accelerator.cc
+++ b/media/gpu/windows/d3d12_video_encode_accelerator.cc
@@ -513,11 +513,11 @@
DCHECK_CALLED_ON_VALID_SEQUENCE(child_sequence_checker_);
destroy_requested_ = true;
- child_weak_this_factory_.InvalidateWeakPtrs();
+ child_weak_this_factory_.InvalidateWeakPtrsAndDoom();
// We're destroying; cancel all callbacks.
if (client_ptr_factory_) {
- client_ptr_factory_->InvalidateWeakPtrs();
+ client_ptr_factory_->InvalidateWeakPtrsAndDoom();
}
encoder_task_runner_->PostTask(
@@ -903,12 +903,6 @@
void D3D12VideoEncodeAccelerator::DestroyTask() {
DVLOGF(2);
DCHECK_CALLED_ON_VALID_SEQUENCE(encoder_sequence_checker_);
-
- // Invalidate weak pointers created by |encoder_weak_this_factory_| so that
- // any tasks posted with the encoder weak pointer will safely no-op if they
- // run after this call.
- encoder_weak_this_factory_.InvalidateWeakPtrs();
-
delete this;
}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
Hadn't see this method before, I'll keep it in mind. LGTM.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
PTAL, git cl split ended up splitting dependent changes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Use InvalidateWeakPtrAndDoom where appropriate in media/
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
encoder_weak_this_factory_.InvalidateWeakPtrs();why don't we need it anymore?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +0 |
| Commit-Queue | +2 |
encoder_weak_this_factory_.InvalidateWeakPtrs();why don't we need it anymore?
delete this triggers the invalidation immediately, so there's no point.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Use InvalidateWeakPtrAndDoom where appropriate in media/
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Use InvalidateWeakPtrAndDoom where appropriate in media/
This CL was uploaded by git cl split.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Dale Curtis abandoned this change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |