webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data.
https://bugs.webkit.org/show_bug.cgi?id=102356

Reviewed by Adam Barth.

A clean-up code was moved from uninitialize to clear method.
AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear.
m_isStopScheduled filters out second ActiveDOMObject::stop call.
markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread.
adoptRef was added in createOfflineContext method.
A guard was added into deleteMarkedNodes.

Source/WebCore:

Test: inspector-protocol/nmi-webaudio-leak-test.html

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createOfflineContext):
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::constructCommon):
(WebCore::AudioContext::~AudioContext):
(WebCore::AudioContext::clear):
(WebCore::AudioContext::uninitialize):
(WebCore::AudioContext::stopDispatch):
(WebCore::AudioContext::stop):
(WebCore::AudioContext::markForDeletion):
(WebCore::AudioContext::scheduleNodeDeletion):
(WebCore::AudioContext::deleteMarkedNodes):
* Modules/webaudio/AudioContext.h:
(AudioContext):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* platform/PlatformMemoryInstrumentation.cpp:
(WebCore::PlatformMemoryInstrumentation::reportMemoryUsage):
(WebCore):
* platform/PlatformMemoryInstrumentation.h:
(PlatformMemoryInstrumentation):
(WebCore):

LayoutTests:

* inspector-protocol/nmi-webaudio-leak-test-expected.txt: Added.
* inspector-protocol/nmi-webaudio-leak-test.html: Added.
* platform/chromium-android/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135152 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, skip new failing tests.

* platform/qt-5.0-wk2/TestExpectations:
* platform/qt-5.0-wk2/compositing/layer-creation/fixed-position-out-of-view-expected.txt: Removed, because it is unnecessary.
* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Fix possible crash in EwkViewImpl::displayTimerFired()
https://bugs.webkit.org/show_bug.cgi?id=102682

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-11-19
Reviewed by Kenneth Rohde Christiansen.

Add NULL check for DrawingAreaProxy and LayerTreeCoordinatorProxy
in displayTimerFired() to avoid crashing if those have already
been destroyed by the time to timer is fired.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::layerTreeRenderer):
(EwkViewImpl::displayTimerFired):
(EwkViewImpl::createGLSurface):
(EwkViewImpl::enterAcceleratedCompositingMode):
* UIProcess/API/efl/EwkViewImpl.h:
(WebKit):
(EwkViewImpl):

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