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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 1941693002: Weak HTMLMediaElement::m_audioSourceNode reference must be cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clear the weak reference Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 3733 matching lines...) Expand 10 before | Expand all | Expand 10 after
3744 ASSERT(code == AbortError || code == NotSupportedError); 3744 ASSERT(code == AbortError || code == NotSupportedError);
3745 3745
3746 for (auto& resolver: m_playResolvers) 3746 for (auto& resolver: m_playResolvers)
3747 resolver->reject(DOMException::create(code, message)); 3747 resolver->reject(DOMException::create(code, message));
3748 3748
3749 m_playResolvers.clear(); 3749 m_playResolvers.clear();
3750 } 3750 }
3751 3751
3752 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3752 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3753 { 3753 {
3754 if (!ThreadHeap::isHeapObjectAlive(m_audioSourceNode)) 3754 if (!ThreadHeap::isHeapObjectAlive(m_audioSourceNode)) {
3755 getAudioSourceProvider().setClient(nullptr); 3755 getAudioSourceProvider().setClient(nullptr);
3756 m_audioSourceNode = nullptr;
3757 }
3756 } 3758 }
3757 3759
3758 void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* pro vider) 3760 void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* pro vider)
3759 { 3761 {
3760 MutexLocker locker(provideInputLock); 3762 MutexLocker locker(provideInputLock);
3761 3763
3762 if (m_webAudioSourceProvider && provider != m_webAudioSourceProvider) 3764 if (m_webAudioSourceProvider && provider != m_webAudioSourceProvider)
3763 m_webAudioSourceProvider->setClient(nullptr); 3765 m_webAudioSourceProvider->setClient(nullptr);
3764 3766
3765 m_webAudioSourceProvider = provider; 3767 m_webAudioSourceProvider = provider;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 3850
3849 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst 3851 IntRect HTMLMediaElement::AutoplayHelperClientImpl::absoluteBoundingBoxRect() co nst
3850 { 3852 {
3851 IntRect result; 3853 IntRect result;
3852 if (LayoutObject* object = m_element->layoutObject()) 3854 if (LayoutObject* object = m_element->layoutObject())
3853 result = object->absoluteBoundingBoxRect(); 3855 result = object->absoluteBoundingBoxRect();
3854 return result; 3856 return result;
3855 } 3857 }
3856 3858
3857 } // namespace blink 3859 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698