| 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) {
|
|
|