https://bugs.webkit.org/show_bug.cgi?id=145758
Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-06-08
Reviewed by Darin Adler.
No new tests, no behavior changes.
* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::BatteryManager):
* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::CDM):
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::MediaKeys):
(WebCore::MediaKeys::~MediaKeys):
* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::continueFunction):
* Modules/indexeddb/IDBCursorBackendOperations.cpp:
(WebCore::CursorAdvanceOperation::perform):
(WebCore::CursorIterationOperation::perform):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transactionFinished):
* Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
(WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
* Modules/indexeddb/IDBEventDispatcher.cpp:
(WebCore::IDBEventDispatcher::dispatch):
* Modules/indexeddb/IDBIndex.h:
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::openKeyCursor):
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::add):
(WebCore::IDBObjectStore::put):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::openCursor):
* Modules/indexeddb/IDBObjectStore.h:
(WebCore::IDBObjectStore::count):
* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
(WebCore::IDBOpenDBRequest::onSuccess):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::commit):
* Modules/indexeddb/IDBTransactionBackendOperations.cpp:
(WebCore::OpenCursorOperation::perform):
* Modules/indieui/UIRequestEvent.cpp:
(WebCore::UIRequestEventInit::UIRequestEventInit):
(WebCore::UIRequestEvent::UIRequestEvent):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource):
(WebCore::MediaSource::setReadyState):
(WebCore::MediaSource::removeSourceBuffer):
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::~SourceBuffer):
(WebCore::SourceBuffer::removedFromMediaSource):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::~MediaStream):
* Modules/mediastream/MediaStreamEvent.cpp:
(WebCore::MediaStreamEventInit::MediaStreamEventInit):
* Modules/mediastream/MediaStreamTrackEvent.cpp:
(WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::stop):
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::contextDestroyed):
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/notifications/Notification.h:
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::SpeechSynthesis):
(WebCore::SpeechSynthesis::setPlatformSynthesizer):
(WebCore::SpeechSynthesis::cancel):
(WebCore::SpeechSynthesis::handleSpeakingCompleted):
* Modules/speech/SpeechSynthesisUtterance.cpp:
(WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
(WebCore::AudioBufferSourceNode::clearPannerNode):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaElementAudioSourceNode.cpp:
(WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::setType):
(WebCore::OscillatorNode::process):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::DatabaseThread):
(WebCore::DatabaseThread::databaseThread):
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::DatabaseTracker):
* Modules/webdatabase/SQLCallbackWrapper.h:
(WebCore::SQLCallbackWrapper::clear):
(WebCore::SQLCallbackWrapper::unwrap):
* Modules/webdatabase/SQLStatementBackend.cpp:
(WebCore::SQLStatementBackend::clearFailureDueToQuota):
* Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::deliverTransactionErrorCallback):
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::doCleanup):
(WebCore::SQLTransactionBackend::getNextStatement):
* Modules/webdatabase/SQLTransactionCoordinator.cpp:
(WebCore::SQLTransactionCoordinator::releaseLock):
* Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
(WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
(WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
(WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::stop):
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::disconnect):
(WebCore::WebSocketChannel::didCloseSocketStream):
* Modules/websockets/WebSocketFrame.h:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clearScriptExecutionContext):
(WebCore::WebSocketHandshake::readStatusLine):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
(WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
(WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185336
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-06-08 Hunseop Jeong <hs85.jeong@samsung.com>
+
+ Replaced 0 with nullptr in WebCore/Modules.
+ https://bugs.webkit.org/show_bug.cgi?id=145758
+
+ Reviewed by Darin Adler.
+
+ No new tests, no behavior changes.
+
+ * Modules/battery/BatteryManager.cpp:
+ (WebCore::BatteryManager::BatteryManager):
+ * Modules/encryptedmedia/CDM.cpp:
+ (WebCore::CDM::CDM):
+ * Modules/encryptedmedia/MediaKeys.cpp:
+ (WebCore::MediaKeys::MediaKeys):
+ (WebCore::MediaKeys::~MediaKeys):
+ * Modules/indexeddb/IDBCursor.h:
+ (WebCore::IDBCursor::continueFunction):
+ * Modules/indexeddb/IDBCursorBackendOperations.cpp:
+ (WebCore::CursorAdvanceOperation::perform):
+ (WebCore::CursorIterationOperation::perform):
+ * Modules/indexeddb/IDBDatabase.cpp:
+ (WebCore::IDBDatabase::transactionFinished):
+ * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
+ (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
+ * Modules/indexeddb/IDBEventDispatcher.cpp:
+ (WebCore::IDBEventDispatcher::dispatch):
+ * Modules/indexeddb/IDBIndex.h:
+ (WebCore::IDBIndex::openCursor):
+ (WebCore::IDBIndex::count):
+ (WebCore::IDBIndex::openKeyCursor):
+ * Modules/indexeddb/IDBObjectStore.cpp:
+ (WebCore::IDBObjectStore::add):
+ (WebCore::IDBObjectStore::put):
+ (WebCore::IDBObjectStore::index):
+ (WebCore::IDBObjectStore::openCursor):
+ * Modules/indexeddb/IDBObjectStore.h:
+ (WebCore::IDBObjectStore::count):
+ * Modules/indexeddb/IDBOpenDBRequest.cpp:
+ (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
+ (WebCore::IDBOpenDBRequest::onSuccess):
+ * Modules/indexeddb/IDBRequest.cpp:
+ (WebCore::IDBRequest::IDBRequest):
+ * Modules/indexeddb/IDBTransaction.cpp:
+ (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
+ * Modules/indexeddb/IDBTransactionBackend.cpp:
+ (WebCore::IDBTransactionBackend::commit):
+ * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
+ (WebCore::OpenCursorOperation::perform):
+ * Modules/indieui/UIRequestEvent.cpp:
+ (WebCore::UIRequestEventInit::UIRequestEventInit):
+ (WebCore::UIRequestEvent::UIRequestEvent):
+ * Modules/mediasource/MediaSource.cpp:
+ (WebCore::MediaSource::MediaSource):
+ (WebCore::MediaSource::setReadyState):
+ (WebCore::MediaSource::removeSourceBuffer):
+ * Modules/mediasource/SourceBuffer.cpp:
+ (WebCore::SourceBuffer::~SourceBuffer):
+ (WebCore::SourceBuffer::removedFromMediaSource):
+ * Modules/mediastream/MediaStream.cpp:
+ (WebCore::MediaStream::~MediaStream):
+ * Modules/mediastream/MediaStreamEvent.cpp:
+ (WebCore::MediaStreamEventInit::MediaStreamEventInit):
+ * Modules/mediastream/MediaStreamTrackEvent.cpp:
+ (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
+ * Modules/mediastream/RTCDataChannel.cpp:
+ (WebCore::RTCDataChannel::stop):
+ * Modules/mediastream/UserMediaRequest.cpp:
+ (WebCore::UserMediaRequest::contextDestroyed):
+ * Modules/notifications/Notification.cpp:
+ (WebCore::Notification::Notification):
+ * Modules/notifications/Notification.h:
+ * Modules/speech/SpeechSynthesis.cpp:
+ (WebCore::SpeechSynthesis::SpeechSynthesis):
+ (WebCore::SpeechSynthesis::setPlatformSynthesizer):
+ (WebCore::SpeechSynthesis::cancel):
+ (WebCore::SpeechSynthesis::handleSpeakingCompleted):
+ * Modules/speech/SpeechSynthesisUtterance.cpp:
+ (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
+ * Modules/webaudio/AudioBufferSourceNode.cpp:
+ (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
+ (WebCore::AudioBufferSourceNode::clearPannerNode):
+ * Modules/webaudio/AudioContext.cpp:
+ (WebCore::AudioContext::createMediaStreamSource):
+ * Modules/webaudio/MediaElementAudioSourceNode.cpp:
+ (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
+ * Modules/webaudio/OscillatorNode.cpp:
+ (WebCore::OscillatorNode::setType):
+ (WebCore::OscillatorNode::process):
+ * Modules/webdatabase/DatabaseManager.cpp:
+ (WebCore::DatabaseManager::DatabaseManager):
+ * Modules/webdatabase/DatabaseThread.cpp:
+ (WebCore::DatabaseThread::DatabaseThread):
+ (WebCore::DatabaseThread::databaseThread):
+ * Modules/webdatabase/DatabaseThread.h:
+ * Modules/webdatabase/DatabaseTracker.cpp:
+ (WebCore::DatabaseTracker::DatabaseTracker):
+ * Modules/webdatabase/SQLCallbackWrapper.h:
+ (WebCore::SQLCallbackWrapper::clear):
+ (WebCore::SQLCallbackWrapper::unwrap):
+ * Modules/webdatabase/SQLStatementBackend.cpp:
+ (WebCore::SQLStatementBackend::clearFailureDueToQuota):
+ * Modules/webdatabase/SQLTransaction.cpp:
+ (WebCore::SQLTransaction::deliverTransactionErrorCallback):
+ * Modules/webdatabase/SQLTransactionBackend.cpp:
+ (WebCore::SQLTransactionBackend::doCleanup):
+ (WebCore::SQLTransactionBackend::getNextStatement):
+ * Modules/webdatabase/SQLTransactionCoordinator.cpp:
+ (WebCore::SQLTransactionCoordinator::releaseLock):
+ * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
+ (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
+ (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
+ * Modules/websockets/WebSocket.cpp:
+ (WebCore::WebSocket::stop):
+ * Modules/websockets/WebSocketChannel.cpp:
+ (WebCore::WebSocketChannel::disconnect):
+ (WebCore::WebSocketChannel::didCloseSocketStream):
+ * Modules/websockets/WebSocketFrame.h:
+ * Modules/websockets/WebSocketHandshake.cpp:
+ (WebCore::WebSocketHandshake::clearScriptExecutionContext):
+ (WebCore::WebSocketHandshake::readStatusLine):
+ * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
+ (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
+ (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
+ (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
+
2015-06-08 Chris Fleizach <cfleizach@apple.com>
AX: improve list heuristics (presentational use versus actual lists)
BatteryManager::BatteryManager(Navigator* navigator)
: ActiveDOMObject(navigator->frame()->document())
, m_batteryController(BatteryController::from(navigator->frame()->page()))
- , m_batteryStatus(0)
+ , m_batteryStatus(nullptr)
{
m_batteryController->addListener(this);
}
CDM::CDM(const String& keySystem)
: m_keySystem(keySystem)
- , m_client(0)
+ , m_client(nullptr)
{
m_private = CDMFactoryForKeySystem(keySystem)->constructor(this);
}
}
MediaKeys::MediaKeys(const String& keySystem, std::unique_ptr<CDM> cdm)
- : m_mediaElement(0)
+ : m_mediaElement(nullptr)
, m_keySystem(keySystem)
, m_cdm(WTF::move(cdm))
{
// When destroying a MediaKeys object, follow the steps in close().
for (auto& session : m_sessions) {
session->close();
- session->setKeys(0);
+ session->setKeys(nullptr);
}
}
PassRefPtr<IDBRequest> update(JSC::ExecState*, Deprecated::ScriptValue&, ExceptionCode&);
void advance(unsigned long, ExceptionCode&);
// FIXME: Try to modify the code generator so this overload is unneeded.
- void continueFunction(ScriptExecutionContext*, ExceptionCode& ec) { continueFunction(static_cast<IDBKey*>(0), ec); }
+ void continueFunction(ScriptExecutionContext*, ExceptionCode& ec) { continueFunction(static_cast<IDBKey*>(nullptr), ec); }
void continueFunction(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
PassRefPtr<IDBRequest> deleteFunction(ScriptExecutionContext*, ExceptionCode&);
} else if (!key) {
// If there's no error but also no key, then the cursor reached the end.
m_cursor->clear();
- m_callbacks->onSuccess(static_cast<SharedBuffer*>(0));
+ m_callbacks->onSuccess(static_cast<SharedBuffer*>(nullptr));
} else {
m_cursor->updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
m_callbacks->onSuccess(key, primaryKey, valueBuffer);
} else if (!key) {
// If there's no error but also no key, then the cursor reached the end.
m_cursor->clear();
- m_callbacks->onSuccess(static_cast<SharedBuffer*>(0));
+ m_callbacks->onSuccess(static_cast<SharedBuffer*>(nullptr));
} else {
m_cursor->updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
m_callbacks->onSuccess(key, primaryKey, valueBuffer);
if (transaction->isVersionChange()) {
ASSERT(m_versionChangeTransaction == transaction);
- m_versionChangeTransaction = 0;
+ m_versionChangeTransaction = nullptr;
}
if (m_closePending && m_transactions.isEmpty())
}
IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl()
- : m_database(0)
+ : m_database(nullptr)
{
}
// event on the window until that has been implemented)." -- Jonas Sicking
doneDispatching:
- event->setCurrentTarget(0);
+ event->setCurrentTarget(nullptr);
event->setEventPhase(0);
return !event->defaultPrevented();
}
int64_t id() const { return m_metadata.id; }
// FIXME: Try to modify the code generator so this is unneeded.
- PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, static_cast<IDBKeyRange*>(0), ec); }
+ PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) { return openCursor(context, key, IDBCursor::directionNext(), ec); }
PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, const String& direction, ExceptionCode&);
PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const Deprecated::ScriptValue& key, const String& direction, ExceptionCode&);
- PassRefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) { return count(context, static_cast<IDBKeyRange*>(0), ec); }
+ PassRefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) { return count(context, static_cast<IDBKeyRange*>(nullptr), ec); }
PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
- PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openKeyCursor(context, static_cast<IDBKeyRange*>(0), ec); }
+ PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openKeyCursor(context, static_cast<IDBKeyRange*>(nullptr), ec); }
PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openKeyCursor(context, keyRange, IDBCursor::directionNext(), ec); }
PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext* context, const Deprecated::ScriptValue& key, ExceptionCode& ec) { return openKeyCursor(context, key, IDBCursor::directionNext(), ec); }
PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, const String& direction, ExceptionCode&);
PassRefPtr<IDBRequest> IDBObjectStore::add(JSC::ExecState* state, Deprecated::ScriptValue& value, ExceptionCode& ec)
{
LOG(StorageAPI, "IDBObjectStore::add");
- return put(IDBDatabaseBackend::AddOnly, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
+ return put(IDBDatabaseBackend::AddOnly, IDBAny::create(this), state, value, static_cast<IDBKey*>(nullptr), ec);
}
PassRefPtr<IDBRequest> IDBObjectStore::put(JSC::ExecState* state, Deprecated::ScriptValue& value, const Deprecated::ScriptValue& key, ExceptionCode& ec)
PassRefPtr<IDBRequest> IDBObjectStore::put(JSC::ExecState* state, Deprecated::ScriptValue& value, ExceptionCode& ec)
{
LOG(StorageAPI, "IDBObjectStore::put");
- return put(IDBDatabaseBackend::AddOrUpdate, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
+ return put(IDBDatabaseBackend::AddOrUpdate, IDBAny::create(this), state, value, static_cast<IDBKey*>(nullptr), ec);
}
PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr<IDBAny> source, JSC::ExecState* state, Deprecated::ScriptValue& value, const Deprecated::ScriptValue& keyValue, ExceptionCode& ec)
Vector<int64_t, 1> indexIds;
indexIds.append(m_indexMetadata.id);
if (cursor) {
- cursor->continueFunction(static_cast<IDBKey*>(0), ASSERT_NO_EXCEPTION);
+ cursor->continueFunction(static_cast<IDBKey*>(nullptr), ASSERT_NO_EXCEPTION);
RefPtr<IDBKey> primaryKey = cursor->idbPrimaryKey();
Deprecated::ScriptValue value = cursor->value();
return 0;
}
- const IDBIndexMetadata* indexMetadata(0);
+ const IDBIndexMetadata* indexMetadata(nullptr);
for (auto& index : m_metadata.indexes.values()) {
if (index.name == name) {
indexMetadata = &index;
PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCode& ec)
{
- return openCursor(context, static_cast<IDBKeyRange*>(0), ec);
+ return openCursor(context, static_cast<IDBKeyRange*>(nullptr), ec);
}
PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
PassRefPtr<IDBIndex> index(const String& name, ExceptionCode&);
void deleteIndex(const String& name, ExceptionCode&);
- PassRefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) { return count(context, static_cast<IDBKeyRange*>(0), ec); }
+ PassRefPtr<IDBRequest> count(ScriptExecutionContext* context, ExceptionCode& ec) { return count(context, static_cast<IDBKeyRange*>(nullptr), ec); }
PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const Deprecated::ScriptValue& key, ExceptionCode&);
RefPtr<IDBDatabase> idbDatabase = IDBDatabase::create(scriptExecutionContext(), databaseBackend, m_databaseCallbacks);
idbDatabase->setMetadata(metadata);
m_databaseCallbacks->connect(idbDatabase.get());
- m_databaseCallbacks = 0;
+ m_databaseCallbacks = nullptr;
IDBDatabaseMetadata oldMetadata(metadata);
oldMetadata.version = oldVersion;
ASSERT(m_databaseCallbacks);
idbDatabase = IDBDatabase::create(scriptExecutionContext(), backend.release(), m_databaseCallbacks);
m_databaseCallbacks->connect(idbDatabase.get());
- m_databaseCallbacks = 0;
+ m_databaseCallbacks = nullptr;
m_result = IDBAny::create(idbDatabase.get());
}
idbDatabase->setMetadata(metadata);
IDBRequest::IDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, IDBDatabaseBackend::TaskType taskType, IDBTransaction* transaction)
: ActiveDOMObject(context)
- , m_result(0)
+ , m_result(nullptr)
, m_errorCode(0)
, m_contextStopped(false)
, m_transaction(transaction)
, m_cursorType(IndexedDB::CursorType::KeyAndValue)
, m_cursorDirection(IndexedDB::CursorDirection::Next)
, m_cursorFinished(false)
- , m_pendingCursor(0)
+ , m_pendingCursor(nullptr)
, m_didFireUpgradeNeededEvent(false)
, m_preventPropagation(false)
, m_requestState(context)
{
if (m_cursor) {
m_transaction->unregisterOpenCursor(m_cursor);
- m_cursor = 0;
+ m_cursor = nullptr;
m_transaction.clear();
}
}
m_database->transactionFinishedAndAbortFired(this);
}
- m_database = 0;
+ m_database = nullptr;
});
}
m_callbacks->onError(error);
} else if (!key) {
// If there's no error but also no key, then the cursor had no records.
- m_callbacks->onSuccess(static_cast<SharedBuffer*>(0));
+ m_callbacks->onSuccess(static_cast<SharedBuffer*>(nullptr));
} else {
RefPtr<IDBCursorBackend> cursor = IDBCursorBackend::create(cursorID, m_cursorType, m_taskType, *m_transaction, m_objectStoreID);
cursor->updateCursorData(key.get(), primaryKey.get(), valueBuffer.get());
UIRequestEventInit::UIRequestEventInit()
: UIEventInit(true, true)
- , receiver(0)
+ , receiver(nullptr)
{
}
}
UIRequestEvent::UIRequestEvent()
- : m_receiver(0)
+ : m_receiver(nullptr)
{
}
MediaSource::MediaSource(ScriptExecutionContext& context)
: ActiveDOMObject(&context)
- , m_mediaElement(0)
+ , m_mediaElement(nullptr)
, m_duration(MediaTime::invalidTime())
, m_pendingSeekTime(MediaTime::invalidTime())
, m_readyState(closedKeyword())
if (state == closedKeyword()) {
m_private.clear();
- m_mediaElement = 0;
+ m_mediaElement = nullptr;
m_duration = MediaTime::invalidTime();
}
AudioTrack* track = audioTracks->lastItem();
// 5.3.1 Set the sourceBuffer attribute on the AudioTrack object to null.
- track->setSourceBuffer(0);
+ track->setSourceBuffer(nullptr);
// 5.3.2 If the enabled attribute on the AudioTrack object is true, then set the removed enabled
// audio track flag to true.
VideoTrack* track = videoTracks->lastItem();
// 7.3.1 Set the sourceBuffer attribute on the VideoTrack object to null.
- track->setSourceBuffer(0);
+ track->setSourceBuffer(nullptr);
// 7.3.2 If the selected attribute on the VideoTrack object is true, then set the removed selected
// video track flag to true.
TextTrack* track = textTracks->lastItem();
// 9.3.1 Set the sourceBuffer attribute on the TextTrack object to null.
- track->setSourceBuffer(0);
+ track->setSourceBuffer(nullptr);
// 9.3.2 If the mode attribute on the TextTrack object is set to "showing" or "hidden", then
// set the removed enabled text track flag to true.
{
ASSERT(isRemoved());
- m_private->setClient(0);
+ m_private->setClient(nullptr);
}
PassRefPtr<TimeRanges> SourceBuffer::buffered(ExceptionCode& ec) const
}
m_private->removedFromMediaSource();
- m_source = 0;
+ m_source = nullptr;
}
void SourceBuffer::seekToTime(const MediaTime& time)
MediaStream::~MediaStream()
{
- m_private->setClient(0);
+ m_private->setClient(nullptr);
}
bool MediaStream::active() const
namespace WebCore {
MediaStreamEventInit::MediaStreamEventInit()
- : stream(0)
+ : stream(nullptr)
{
}
namespace WebCore {
MediaStreamTrackEventInit::MediaStreamTrackEventInit()
- : track(0)
+ : track(nullptr)
{
}
{
m_stopped = true;
m_readyState = ReadyStateClosed;
- m_handler->setClient(0);
- m_scriptExecutionContext = 0;
+ m_handler->setClient(nullptr);
+ m_scriptExecutionContext = nullptr;
}
void RTCDataChannel::scheduleDispatchEvent(PassRefPtr<Event> event)
if (m_controller) {
m_controller->cancelRequest(*this);
- m_controller = 0;
+ m_controller = nullptr;
}
ContextDestructionObserver::contextDestroyed();
namespace WebCore {
Notification::Notification()
- : ActiveDOMObject(0)
+ : ActiveDOMObject(nullptr)
{
}
#if ENABLE(NOTIFICATIONS)
static const String permission(ScriptExecutionContext*);
WEBCORE_EXPORT static const String permissionString(NotificationClient::Permission);
- static void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback> = 0);
+ static void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback> = nullptr);
#endif
private:
}
SpeechSynthesis::SpeechSynthesis()
- : m_currentSpeechUtterance(0)
+ : m_currentSpeechUtterance(nullptr)
, m_isPaused(false)
#if PLATFORM(IOS)
, m_restrictions(RequireUserGestureForSpeechStartRestriction)
{
m_platformSpeechSynthesizer = WTF::move(synthesizer);
m_voiceList.clear();
- m_currentSpeechUtterance = 0;
+ m_currentSpeechUtterance = nullptr;
m_utteranceQueue.clear();
m_isPaused = false;
}
m_utteranceQueue.clear();
if (m_platformSpeechSynthesizer)
m_platformSpeechSynthesizer->cancel();
- current = 0;
+ current = nullptr;
// The platform should have called back immediately and cleared the current utterance.
ASSERT(!m_currentSpeechUtterance);
ASSERT(m_currentSpeechUtterance);
RefPtr<SpeechSynthesisUtterance> protect(utterance);
- m_currentSpeechUtterance = 0;
+ m_currentSpeechUtterance = nullptr;
fireEvent(errorOccurred ? eventNames().errorEvent : eventNames().endEvent, utterance, 0, String());
SpeechSynthesisUtterance::~SpeechSynthesisUtterance()
{
- m_platformUtterance->setClient(0);
+ m_platformUtterance->setClient(nullptr);
}
SpeechSynthesisVoice* SpeechSynthesisUtterance::voice() const
AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* context, float sampleRate)
: AudioScheduledSourceNode(context, sampleRate)
- , m_buffer(0)
+ , m_buffer(nullptr)
, m_isLooping(false)
, m_loopStart(0)
, m_loopEnd(0)
, m_grainOffset(0.0)
, m_grainDuration(DefaultGrainDuration)
, m_lastGain(1.0)
- , m_pannerNode(0)
+ , m_pannerNode(nullptr)
{
setNodeType(NodeTypeAudioBufferSource);
{
if (m_pannerNode) {
m_pannerNode->deref(AudioNode::RefTypeConnection);
- m_pannerNode = 0;
+ m_pannerNode = nullptr;
}
}
ASSERT(isMainThread());
lazyInitialize();
- AudioSourceProvider* provider = 0;
+ AudioSourceProvider* provider = nullptr;
RefPtr<MediaStreamTrack> audioTrack;
MediaElementAudioSourceNode::~MediaElementAudioSourceNode()
{
- m_mediaElement->setAudioSourceNode(0);
+ m_mediaElement->setAudioSourceNode(nullptr);
uninitialize();
}
using namespace VectorMath;
-PeriodicWave* OscillatorNode::s_periodicWaveSine = 0;
-PeriodicWave* OscillatorNode::s_periodicWaveSquare = 0;
-PeriodicWave* OscillatorNode::s_periodicWaveSawtooth = 0;
-PeriodicWave* OscillatorNode::s_periodicWaveTriangle = 0;
+PeriodicWave* OscillatorNode::s_periodicWaveSine = nullptr;
+PeriodicWave* OscillatorNode::s_periodicWaveSquare = nullptr;
+PeriodicWave* OscillatorNode::s_periodicWaveSawtooth = nullptr;
+PeriodicWave* OscillatorNode::s_periodicWaveTriangle = nullptr;
Ref<OscillatorNode> OscillatorNode::create(AudioContext* context, float sampleRate)
{
bool OscillatorNode::setType(unsigned type)
{
- PeriodicWave* periodicWave = 0;
+ PeriodicWave* periodicWave = nullptr;
float sampleRate = this->sampleRate();
switch (type) {
bool hasSampleAccurateValues = calculateSampleAccuratePhaseIncrements(framesToProcess);
float frequency = 0;
- float* higherWaveData = 0;
- float* lowerWaveData = 0;
+ float* higherWaveData = nullptr;
+ float* lowerWaveData = nullptr;
float tableInterpolationFactor;
if (!hasSampleAccurateValues) {
DatabaseManager::DatabaseManager()
: m_server(new DatabaseServer)
- , m_client(0)
+ , m_client(nullptr)
, m_databaseIsAvailable(true)
#if !ASSERT_DISABLED
, m_databaseContextRegisteredCount(0)
#endif
, m_transactionClient(std::make_unique<SQLTransactionClient>())
, m_transactionCoordinator(std::make_unique<SQLTransactionCoordinator>())
- , m_cleanupSync(0)
+ , m_cleanupSync(nullptr)
{
m_selfRef = this;
}
DatabaseTaskSynchronizer* cleanupSync = m_cleanupSync;
// Clear the self refptr, possibly resulting in deletion
- m_selfRef = 0;
+ m_selfRef = nullptr;
if (cleanupSync) // Someone wanted to know when we were done cleaning up.
cleanupSync->taskCompleted();
bool start();
void requestTermination(DatabaseTaskSynchronizer* cleanupSync);
- bool terminationRequested(DatabaseTaskSynchronizer* taskSynchronizer = 0) const;
+ bool terminationRequested(DatabaseTaskSynchronizer* = nullptr) const;
void scheduleTask(std::unique_ptr<DatabaseTask>);
void scheduleImmediateTask(std::unique_ptr<DatabaseTask>); // This just adds the task to the front of the queue - the caller needs to be extremely careful not to create deadlocks when waiting for completion.
return std::unique_ptr<DatabaseTracker>(new DatabaseTracker(databasePath));
}
-static DatabaseTracker* staticTracker = 0;
+static DatabaseTracker* staticTracker = nullptr;
void DatabaseTracker::initializeTracker(const String& databasePath)
{
}
DatabaseTracker::DatabaseTracker(const String& databasePath)
- : m_client(0)
+ : m_client(nullptr)
{
setDatabaseDirectoryPath(databasePath);
}
return;
}
if (m_scriptExecutionContext->isContextThread()) {
- m_callback = 0;
- m_scriptExecutionContext = 0;
+ m_callback = nullptr;
+ m_scriptExecutionContext = nullptr;
return;
}
scriptExecutionContextPtr = m_scriptExecutionContext.release().leakRef();
{
MutexLocker locker(m_mutex);
ASSERT(!m_callback || m_scriptExecutionContext->isContextThread());
- m_scriptExecutionContext = 0;
+ m_scriptExecutionContext = nullptr;
return m_callback.release();
}
void SQLStatementBackend::clearFailureDueToQuota()
{
if (lastExecutionFailedDueToQuota())
- m_error = 0;
+ m_error = nullptr;
}
bool SQLStatementBackend::lastExecutionFailedDueToQuota() const
ASSERT(m_transactionError);
errorCallback->handleEvent(m_transactionError.get());
- m_transactionError = 0;
+ m_transactionError = nullptr;
}
clearCallbackWrappers();
{
if (!m_frontend)
return;
- m_frontend = 0; // Break the reference cycle. See comment about the life-cycle above.
+ m_frontend = nullptr; // Break the reference cycle. See comment about the life-cycle above.
ASSERT(currentThread() == database()->databaseContext()->databaseThread()->getThreadID());
// SQLTransactionBackend is guaranteed to not destruct until the frontend
// is also destructing.
- m_wrapper = 0;
+ m_wrapper = nullptr;
}
SQLStatement* SQLTransactionBackend::currentStatement()
void SQLTransactionBackend::getNextStatement()
{
- m_currentStatementBackend = 0;
+ m_currentStatementBackend = nullptr;
MutexLocker locker(m_statementMutex);
if (!m_statementQueue.isEmpty())
info.activeReadTransactions.remove(transaction);
} else {
ASSERT(info.activeWriteTransaction == transaction);
- info.activeWriteTransaction = 0;
+ info.activeWriteTransaction = nullptr;
}
processPendingTransactions(info);
ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper(ScriptExecutionContext* context, WebSocketChannelClient* client)
: m_context(context)
, m_client(client)
- , m_peer(0)
+ , m_peer(nullptr)
, m_failedWebSocketChannelCreation(false)
, m_syncMethodDone(true)
, m_sendRequestResult(ThreadableWebSocketChannel::SendFail)
void ThreadableWebSocketChannelClientWrapper::clearPeer()
{
- m_peer = 0;
+ m_peer = nullptr;
}
bool ThreadableWebSocketChannelClientWrapper::failedWebSocketChannelCreation() const
void ThreadableWebSocketChannelClientWrapper::clearClient()
{
- m_client = 0;
+ m_client = nullptr;
}
void ThreadableWebSocketChannelClientWrapper::didConnect()
bool pending = hasPendingActivity();
if (m_channel)
m_channel->disconnect();
- m_channel = 0;
+ m_channel = nullptr;
m_state = CLOSED;
m_pendingEvents.clear();
ActiveDOMObject::stop();
InspectorInstrumentation::didCloseWebSocket(m_document, m_identifier);
if (m_handshake)
m_handshake->clearScriptExecutionContext();
- m_client = 0;
- m_document = 0;
+ m_client = nullptr;
+ m_document = nullptr;
if (m_handle)
m_handle->disconnect();
}
if (m_suspended)
return;
WebSocketChannelClient* client = m_client;
- m_client = 0;
- m_document = 0;
- m_handle = 0;
+ m_client = nullptr;
+ m_document = nullptr;
+ m_handle = nullptr;
if (client)
client->didClose(m_unhandledBufferedAmount, m_receivedClosingHandshake ? WebSocketChannelClient::ClosingHandshakeComplete : WebSocketChannelClient::ClosingHandshakeIncomplete, m_closeEventCode, m_closeEventReason);
}
static bool needsExtendedLengthField(size_t payloadLength);
static ParseFrameResult parseFrame(char* data, size_t dataLength, WebSocketFrame&, const char*& frameEnd, String& errorString); // May modify part of data to unmask the frame.
- WebSocketFrame(OpCode = OpCodeInvalid, bool final = false, bool compress = false, bool masked = false, const char* payload = 0, size_t payloadLength = 0);
+ WebSocketFrame(OpCode = OpCodeInvalid, bool final = false, bool compress = false, bool masked = false, const char* payload = nullptr, size_t payloadLength = 0);
void makeFrameData(Vector<char>& frameData);
OpCode opCode;
void WebSocketHandshake::clearScriptExecutionContext()
{
- m_context = 0;
+ m_context = nullptr;
}
int WebSocketHandshake::readServerHandshake(const char* header, size_t len)
statusCode = -1;
statusText = String();
- const char* space1 = 0;
- const char* space2 = 0;
+ const char* space1 = nullptr;
+ const char* space2 = nullptr;
const char* p;
size_t consumedLength;
if (!m_mainWebSocketChannel)
return;
m_mainWebSocketChannel->disconnect();
- m_mainWebSocketChannel = 0;
+ m_mainWebSocketChannel = nullptr;
}
void WorkerThreadableWebSocketChannel::Peer::suspend()
void WorkerThreadableWebSocketChannel::Peer::didClose(unsigned long unhandledBufferedAmount, ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
{
ASSERT(isMainThread());
- m_mainWebSocketChannel = 0;
+ m_mainWebSocketChannel = nullptr;
RefPtr<ThreadableWebSocketChannelClientWrapper> workerClientWrapper = m_workerClientWrapper;
StringCapture capturedReason(reason);
, m_workerGlobalScope(workerGlobalScope)
, m_loaderProxy(m_workerGlobalScope->thread().workerLoaderProxy())
, m_taskMode(taskMode)
- , m_peer(0)
+ , m_peer(nullptr)
{
ASSERT(m_workerClientWrapper.get());
}