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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 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 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static const double progressNotificationIntervalMS = 50; 45 static const double progressNotificationIntervalMS = 50;
46 46
47 FileWriter* FileWriter::create(ExecutionContext* context) 47 FileWriter* FileWriter::create(ExecutionContext* context)
48 { 48 {
49 FileWriter* fileWriter = new FileWriter(context); 49 FileWriter* fileWriter = new FileWriter(context);
50 fileWriter->suspendIfNeeded(); 50 fileWriter->suspendIfNeeded();
51 return fileWriter; 51 return fileWriter;
52 } 52 }
53 53
54 FileWriter::FileWriter(ExecutionContext* context) 54 FileWriter::FileWriter(ExecutionContext* context)
55 : ActiveDOMObject(context) 55 : ActiveScriptWrappable(this)
56 , ActiveDOMObject(context)
56 , m_readyState(INIT) 57 , m_readyState(INIT)
57 , m_operationInProgress(OperationNone) 58 , m_operationInProgress(OperationNone)
58 , m_queuedOperation(OperationNone) 59 , m_queuedOperation(OperationNone)
59 , m_bytesWritten(0) 60 , m_bytesWritten(0)
60 , m_bytesToWrite(0) 61 , m_bytesToWrite(0)
61 , m_truncateLength(-1) 62 , m_truncateLength(-1)
62 , m_numAborts(0) 63 , m_numAborts(0)
63 , m_recursionDepth(0) 64 , m_recursionDepth(0)
64 , m_lastProgressNotificationTimeMS(0) 65 , m_lastProgressNotificationTimeMS(0)
65 , m_asyncOperationId(0) 66 , m_asyncOperationId(0)
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 DEFINE_TRACE(FileWriter) 323 DEFINE_TRACE(FileWriter)
323 { 324 {
324 visitor->trace(m_error); 325 visitor->trace(m_error);
325 visitor->trace(m_blobBeingWritten); 326 visitor->trace(m_blobBeingWritten);
326 EventTargetWithInlineData::trace(visitor); 327 EventTargetWithInlineData::trace(visitor);
327 FileWriterBase::trace(visitor); 328 FileWriterBase::trace(visitor);
328 ActiveDOMObject::trace(visitor); 329 ActiveDOMObject::trace(visitor);
329 } 330 }
330 331
331 } // namespace blink 332 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698