Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(949)

Unified Diff: cc/output/copy_output_request.cc

Issue 239183003: Trace the lifetime of CopyOutputRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/copy_output_request.cc
diff --git a/cc/output/copy_output_request.cc b/cc/output/copy_output_request.cc
index 56dac2a60bfe9de8a25acc5099ebb142e5b1e43d..dcae8e26127bf048af5299fcd236f5b248b3179a 100644
--- a/cc/output/copy_output_request.cc
+++ b/cc/output/copy_output_request.cc
@@ -35,15 +35,21 @@ CopyOutputRequest::CopyOutputRequest(
: force_bitmap_result_(force_bitmap_result),
has_area_(false),
has_texture_mailbox_(false),
- result_callback_(result_callback) {}
+ result_callback_(result_callback) {
+ DCHECK(!result_callback_.is_null());
+ TRACE_EVENT_ASYNC_BEGIN0("cc", "CopyOutputRequest", this);
+}
CopyOutputRequest::~CopyOutputRequest() {
- if (!result_callback_.is_null())
+ if (!result_callback_.is_null()) {
SendResult(CopyOutputResult::CreateEmptyResult().Pass());
+ TRACE_EVENT_ASYNC_END0("cc", "CopyOutputRequest", this);
jdduke (slow) 2014/04/25 17:36:00 Oops, forgot to delete this line.
+ }
}
void CopyOutputRequest::SendResult(scoped_ptr<CopyOutputResult> result) {
base::ResetAndReturn(&result_callback_).Run(result.Pass());
+ TRACE_EVENT_ASYNC_END0("cc", "CopyOutputRequest", this);
}
void CopyOutputRequest::SendEmptyResult() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698