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

Unified Diff: third_party/WebKit/Source/modules/filesystem/FileWriter.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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
Index: third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp b/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
index a63726c6da8629959075d249464173de52621f0b..a4bf8b83712d1da8631b2e251c2663381a919f46 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
@@ -68,14 +68,8 @@ const AtomicString& FileWriter::interfaceName() const {
return EventTargetNames::FileWriter;
}
-void FileWriter::contextDestroyed() {
- // Make sure we've actually got something to stop, and haven't already called
- // abort().
- if (writer() && m_readyState == kWriting) {
- doOperation(OperationAbort);
- m_readyState = kDone;
- }
- resetWriter();
+void FileWriter::contextDestroyed(ExecutionContext*) {
+ dispose();
}
bool FileWriter::hasPendingActivity() const {
@@ -313,7 +307,13 @@ void FileWriter::setError(FileError::ErrorCode errorCode,
}
void FileWriter::dispose() {
- contextDestroyed();
+ // Make sure we've actually got something to stop, and haven't already called
+ // abort().
+ if (writer() && m_readyState == kWriting) {
+ doOperation(OperationAbort);
+ m_readyState = kDone;
+ }
+ resetWriter();
}
DEFINE_TRACE(FileWriter) {

Powered by Google App Engine
This is Rietveld 408576698