webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionOb...
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Nov 2012 07:42:36 +0000 (07:42 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Nov 2012 07:42:36 +0000 (07:42 +0000)
commit0dd8ebe9622e5dd3705b2053a07430c04e30cb0e
tree48d198a169212597c130c0458c945d95c0d4ae88
parent60d00d5df0782d6495a5594dee06421649092ea3
webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext().
https://bugs.webkit.org/show_bug.cgi?id=102649

Reviewed by Adam Barth.

AudioContext uses m_document only as a pointer to ScriptExecutionContext.
It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext.
The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag.

No new tests as there is no new functionality.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::looping):
(WebCore::AudioBufferSourceNode::setLooping):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
(WebCore::AudioContext::stop):
(WebCore::AudioContext::fireCompletionEvent):
(WebCore::AudioContext::reportMemoryUsage):
* Modules/webaudio/AudioContext.h:
(WebCore::AudioContext::scriptExecutionContext):
(AudioContext):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::fireProcessEvent):
(WebCore::ScriptProcessorNode::scriptExecutionContext):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp