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

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

Issue 88183002: HTMLMediaElement::clearMediaPlayer should acquire MediaElementAudioSourceNode::lock() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« 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 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 3378
3379 // Reset m_readyState since m_player is gone. 3379 // Reset m_readyState since m_player is gone.
3380 m_readyState = HAVE_NOTHING; 3380 m_readyState = HAVE_NOTHING;
3381 updateMediaController(); 3381 updateMediaController();
3382 if (RuntimeEnabledFeatures::videoTrackEnabled()) 3382 if (RuntimeEnabledFeatures::videoTrackEnabled())
3383 updateActiveTextTrackCues(0); 3383 updateActiveTextTrackCues(0);
3384 } 3384 }
3385 3385
3386 void HTMLMediaElement::clearMediaPlayer(int flags) 3386 void HTMLMediaElement::clearMediaPlayer(int flags)
3387 { 3387 {
3388 #if ENABLE(WEB_AUDIO)
3389 if (m_audioSourceNode)
3390 m_audioSourceNode->lock();
Ken Russell (switch to Gerrit) 2013/11/26 20:09:24 The manual calls to lock() and unlock() are unfort
3391 #endif
3392
3388 removeAllInbandTracks(); 3393 removeAllInbandTracks();
3389 3394
3390 closeMediaSource(); 3395 closeMediaSource();
3391 3396
3392 m_player.clear(); 3397 m_player.clear();
3393 #if ENABLE(WEB_AUDIO) 3398 #if ENABLE(WEB_AUDIO)
3394 if (audioSourceProvider()) 3399 if (audioSourceProvider())
3395 audioSourceProvider()->setClient(0); 3400 audioSourceProvider()->setClient(0);
acolwell GONE FROM CHROMIUM 2013/11/26 16:08:58 How does this ever get executed? Doesn't audioSour
DaleCurtis 2013/11/26 18:36:15 Hah, wow, yeah that's true even in the original CL
Ken Russell (switch to Gerrit) 2013/11/26 20:09:24 This should be fixed, and further, HTMLMediaElemen
haraken 2013/11/27 01:10:29 Done.
3396 #endif 3401 #endif
3402
3403 #if ENABLE(WEB_AUDIO)
acolwell GONE FROM CHROMIUM 2013/11/26 16:08:58 nit: Remove this line and the #endif right above i
haraken 2013/11/27 01:10:29 Done.
3404 if (m_audioSourceNode)
3405 m_audioSourceNode->unlock();
3406 #endif
3407
3397 stopPeriodicTimers(); 3408 stopPeriodicTimers();
3398 m_loadTimer.stop(); 3409 m_loadTimer.stop();
3399 3410
3400 m_pendingActionFlags &= ~flags; 3411 m_pendingActionFlags &= ~flags;
3401 m_loadState = WaitingForSource; 3412 m_loadState = WaitingForSource;
3402 3413
3403 if (m_textTracks) 3414 if (m_textTracks)
3404 configureTextTrackDisplay(AssumeNoVisibleChange); 3415 configureTextTrackDisplay(AssumeNoVisibleChange);
3405 } 3416 }
3406 3417
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3700 } 3711 }
3701 #endif 3712 #endif
3702 } 3713 }
3703 3714
3704 #if ENABLE(WEB_AUDIO) 3715 #if ENABLE(WEB_AUDIO)
3705 void HTMLMediaElement::setAudioSourceNode(MediaElementAudioSourceNode* sourceNod e) 3716 void HTMLMediaElement::setAudioSourceNode(MediaElementAudioSourceNode* sourceNod e)
3706 { 3717 {
3707 m_audioSourceNode = sourceNode; 3718 m_audioSourceNode = sourceNode;
3708 3719
3709 if (audioSourceProvider()) 3720 if (audioSourceProvider())
3710 audioSourceProvider()->setClient(m_audioSourceNode); 3721 audioSourceProvider()->setClient(m_audioSourceNode);
acolwell GONE FROM CHROMIUM 2013/11/26 16:08:58 Why don't you need a lock around this call of setC
Ken Russell (switch to Gerrit) 2013/11/26 20:09:24 If the lock above is necessary then it's necessary
haraken 2013/11/27 01:10:29 Done.
3711 } 3722 }
3712 3723
3713 AudioSourceProvider* HTMLMediaElement::audioSourceProvider() 3724 AudioSourceProvider* HTMLMediaElement::audioSourceProvider()
3714 { 3725 {
3715 if (m_player) 3726 if (m_player)
3716 return m_player->audioSourceProvider(); 3727 return m_player->audioSourceProvider();
3717 3728
3718 return 0; 3729 return 0;
3719 } 3730 }
3720 #endif 3731 #endif
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
3872 { 3883 {
3873 scheduleLayerUpdate(); 3884 scheduleLayerUpdate();
3874 } 3885 }
3875 3886
3876 bool HTMLMediaElement::isInteractiveContent() const 3887 bool HTMLMediaElement::isInteractiveContent() const
3877 { 3888 {
3878 return fastHasAttribute(controlsAttr); 3889 return fastHasAttribute(controlsAttr);
3879 } 3890 }
3880 3891
3881 } 3892 }
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