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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // it is being destroyed, the connection to the Document will 435 // it is being destroyed, the connection to the Document will
436 // have been severed already, but in that case there is no need 436 // have been severed already, but in that case there is no need
437 // to update the delayed load count. But if the Document hasn't 437 // to update the delayed load count. But if the Document hasn't
438 // been detached cleanly from any frame or it isn't dying in the 438 // been detached cleanly from any frame or it isn't dying in the
439 // same GC, we do update the delayed load count from the prefinalizer. 439 // same GC, we do update the delayed load count from the prefinalizer.
440 if (ActiveDOMObject::getExecutionContext()) 440 if (ActiveDOMObject::getExecutionContext())
441 setShouldDelayLoadEvent(false); 441 setShouldDelayLoadEvent(false);
442 442
443 // If the MediaSource object survived, notify that the media element 443 // If the MediaSource object survived, notify that the media element
444 // didn't. 444 // didn't.
445 if (Heap::isHeapObjectAlive(m_mediaSource)) 445 if (ThreadHeap::isHeapObjectAlive(m_mediaSource))
446 closeMediaSource(); 446 closeMediaSource();
447 447
448 // Oilpan: the player must be released, but the player object 448 // Oilpan: the player must be released, but the player object
449 // cannot safely access this player client any longer as parts of 449 // cannot safely access this player client any longer as parts of
450 // it may have been finalized already (like the media element's 450 // it may have been finalized already (like the media element's
451 // supplementable table.) Handled for now by entering an 451 // supplementable table.) Handled for now by entering an
452 // is-finalizing state, which is explicitly checked for if the 452 // is-finalizing state, which is explicitly checked for if the
453 // player tries to access the media element during shutdown. 453 // player tries to access the media element during shutdown.
454 // 454 //
455 // FIXME: Oilpan: move the media player to the heap instead and 455 // FIXME: Oilpan: move the media player to the heap instead and
(...skipping 3290 matching lines...) Expand 10 before | Expand all | Expand 10 after
3746 ASSERT(code == AbortError || code == NotSupportedError); 3746 ASSERT(code == AbortError || code == NotSupportedError);
3747 3747
3748 for (auto& resolver: m_playResolvers) 3748 for (auto& resolver: m_playResolvers)
3749 resolver->reject(DOMException::create(code, message)); 3749 resolver->reject(DOMException::create(code, message));
3750 3750
3751 m_playResolvers.clear(); 3751 m_playResolvers.clear();
3752 } 3752 }
3753 3753
3754 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3754 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3755 { 3755 {
3756 if (!Heap::isHeapObjectAlive(m_audioSourceNode)) 3756 if (!ThreadHeap::isHeapObjectAlive(m_audioSourceNode))
3757 getAudioSourceProvider().setClient(nullptr); 3757 getAudioSourceProvider().setClient(nullptr);
3758 } 3758 }
3759 3759
3760 void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* pro vider) 3760 void HTMLMediaElement::AudioSourceProviderImpl::wrap(WebAudioSourceProvider* pro vider)
3761 { 3761 {
3762 MutexLocker locker(provideInputLock); 3762 MutexLocker locker(provideInputLock);
3763 3763
3764 if (m_webAudioSourceProvider && provider != m_webAudioSourceProvider) 3764 if (m_webAudioSourceProvider && provider != m_webAudioSourceProvider)
3765 m_webAudioSourceProvider->setClient(nullptr); 3765 m_webAudioSourceProvider->setClient(nullptr);
3766 3766
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
3811 { 3811 {
3812 visitor->trace(m_client); 3812 visitor->trace(m_client);
3813 } 3813 }
3814 3814
3815 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3815 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3816 { 3816 {
3817 visitor->trace(m_client); 3817 visitor->trace(m_client);
3818 } 3818 }
3819 3819
3820 } // namespace blink 3820 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp ('k') | third_party/WebKit/Source/core/svg/SVGElementRareData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698