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

Unified Diff: content/browser/byte_stream.cc

Issue 22925003: Explain the reason why we don't have thread check in destructor of ByteStreamReader/WriterImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/byte_stream.cc
diff --git a/content/browser/byte_stream.cc b/content/browser/byte_stream.cc
index 7b0f9fb0f9a792d5e1b6c21714879fba80743115..0cd3cd8c1b21e7e3385de13aeecaa62d94705c65 100644
--- a/content/browser/byte_stream.cc
+++ b/content/browser/byte_stream.cc
@@ -194,6 +194,9 @@ ByteStreamWriterImpl::ByteStreamWriterImpl(
}
ByteStreamWriterImpl::~ByteStreamWriterImpl() {
+ // No RunsTasksOnCurrentThread() check to allow deleting a created writer
+ // before we start using it. Once started, should be deleted on the specified
+ // task runner.
my_lifetime_flag_->is_alive = false;
}
@@ -323,6 +326,9 @@ ByteStreamReaderImpl::ByteStreamReaderImpl(
}
ByteStreamReaderImpl::~ByteStreamReaderImpl() {
+ // No RunsTasksOnCurrentThread() check to allow deleting a created writer
+ // before we start using it. Once started, should be deleted on the specified
+ // task runner.
my_lifetime_flag_->is_alive = false;
}
« no previous file with comments | « no previous file | content/browser/download/download_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698