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

Side by Side Diff: third_party/WebKit/Source/modules/filesystem/FileWriter.cpp

Issue 2366253002: Remove ActiveDOMObject::stop() (Closed)
Patch Set: temp Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 m_bytesWritten(0), 58 m_bytesWritten(0),
59 m_bytesToWrite(0), 59 m_bytesToWrite(0),
60 m_truncateLength(-1), 60 m_truncateLength(-1),
61 m_numAborts(0), 61 m_numAborts(0),
62 m_recursionDepth(0), 62 m_recursionDepth(0),
63 m_lastProgressNotificationTimeMS(0) {} 63 m_lastProgressNotificationTimeMS(0) {}
64 64
65 FileWriter::~FileWriter() { 65 FileWriter::~FileWriter() {
66 ASSERT(!m_recursionDepth); 66 ASSERT(!m_recursionDepth);
67 if (m_readyState == kWriting) 67 if (m_readyState == kWriting)
68 stop(); 68 contextDestroyed();
69 } 69 }
70 70
71 const AtomicString& FileWriter::interfaceName() const { 71 const AtomicString& FileWriter::interfaceName() const {
72 return EventTargetNames::FileWriter; 72 return EventTargetNames::FileWriter;
73 } 73 }
74 74
75 void FileWriter::stop() { 75 void FileWriter::contextDestroyed() {
76 // Make sure we've actually got something to stop, and haven't already called abort(). 76 // Make sure we've actually got something to stop, and haven't already called abort().
77 if (!writer() || m_readyState != kWriting) 77 if (!writer() || m_readyState != kWriting)
78 return; 78 return;
79 doOperation(OperationAbort); 79 doOperation(OperationAbort);
80 m_readyState = kDone; 80 m_readyState = kDone;
81 } 81 }
82 82
83 bool FileWriter::hasPendingActivity() const { 83 bool FileWriter::hasPendingActivity() const {
84 return m_operationInProgress != OperationNone || 84 return m_operationInProgress != OperationNone ||
85 m_queuedOperation != OperationNone || m_readyState == kWriting; 85 m_queuedOperation != OperationNone || m_readyState == kWriting;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 306
307 DEFINE_TRACE(FileWriter) { 307 DEFINE_TRACE(FileWriter) {
308 visitor->trace(m_error); 308 visitor->trace(m_error);
309 visitor->trace(m_blobBeingWritten); 309 visitor->trace(m_blobBeingWritten);
310 EventTargetWithInlineData::trace(visitor); 310 EventTargetWithInlineData::trace(visitor);
311 FileWriterBase::trace(visitor); 311 FileWriterBase::trace(visitor);
312 ActiveDOMObject::trace(visitor); 312 ActiveDOMObject::trace(visitor);
313 } 313 }
314 314
315 } // namespace blink 315 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698