Don't apply changes while we're clearing the database
https://bugs.webkit.org/show_bug.cgi?id=115826

Reviewed by Darin Adler.

* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::openDatabase):
Only call didOpenDatabaseWithOrigin if we actually did open the database.

(WebKit::LocalStorageDatabase::updateDatabaseWithChangedItems):
Create the database if needed.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getValues):
Send back a DidGetValues message.

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
Initialize m_hasPendingClear.

(WebKit::StorageAreaMap::clear):
Set m_hasPendingClear to true.

(WebKit::StorageAreaMap::resetValues):
Set m_hasPendingClear back to false.

(WebKit::StorageAreaMap::loadValuesIfNeeded):
Set m_hasPendingClear to true so we'll ignore any changes that are already part of the returned items.

(WebKit::StorageAreaMap::didGetValues):
Set m_hasPendingClear back to false.

(WebKit::StorageAreaMap::didClear):
Set m_hasPendingClear back to false.

(WebKit::StorageAreaMap::applyChange):
Don't apply the change if m_hasPendingClear is true.

* WebProcess/Storage/StorageAreaMap.messages.in:
Add DidGetValues message.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Heap-use-after-free in WebCore::AudioNodeOutput::pull
https://bugs.webkit.org/show_bug.cgi?id=111362

Reviewed by Chris Rogers.

* Modules/webaudio/AudioBuffer.cpp:
(WebCore::AudioBuffer::createFromAudioFileData):
* Modules/webaudio/AudioNodeInput.cpp:
(WebCore::AudioNodeInput::AudioNodeInput):
(WebCore::AudioNodeInput::updateInternalBus):
* Modules/webaudio/AudioNodeInput.h:
(AudioNodeInput):
* Modules/webaudio/AudioNodeOutput.cpp:
(WebCore::AudioNodeOutput::AudioNodeOutput):
(WebCore::AudioNodeOutput::updateInternalBus):
(WebCore::AudioNodeOutput::pull):
(WebCore::AudioNodeOutput::bus):
* Modules/webaudio/AudioNodeOutput.h:
(AudioNodeOutput):
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
* Modules/webaudio/OfflineAudioDestinationNode.h:
(OfflineAudioDestinationNode):
* platform/audio/AudioBus.cpp:
(WebCore::AudioBus::createBufferFromRange):
(WebCore::AudioBus::createBySampleRateConverting):
(WebCore::AudioBus::createByMixingToMono):
* platform/audio/AudioBus.h:
(AudioBus):
* platform/audio/AudioFileReader.h:
(WebCore):
* platform/audio/AudioResampler.cpp:
(WebCore::AudioResampler::AudioResampler):
(WebCore::AudioResampler::configureChannels):
* platform/audio/AudioResampler.h:
(AudioResampler):
* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* platform/audio/MultiChannelResampler.cpp:
* platform/audio/Reverb.cpp:
(WebCore::Reverb::initialize):
* platform/audio/Reverb.h:
(Reverb):
* platform/audio/efl/AudioBusEfl.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(AudioFileReader):
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/gtk/AudioBusGtk.cpp:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):
* platform/audio/mac/AudioFileReaderMac.cpp:
(WebCore::AudioFileReader::createBus):
(WebCore::createBusFromAudioFile):
(WebCore::createBusFromInMemoryAudioFile):
* platform/audio/mac/AudioFileReaderMac.h:
(AudioFileReader):
* platform/audio/qt/AudioBusQt.cpp:
(WebCore::AudioBus::loadPlatformResource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149778 268f45cc-cd09-0410-ab3c-d52691b4dbfc