OLD | NEW |
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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
456 // avoid having to finalize it from here; this whole #if block | 456 // avoid having to finalize it from here; this whole #if block |
457 // could then be removed (along with the state bit it depends on.) | 457 // could then be removed (along with the state bit it depends on.) |
458 // crbug.com/378229 | 458 // crbug.com/378229 |
459 m_isFinalizing = true; | 459 m_isFinalizing = true; |
460 #endif | 460 #endif |
461 | 461 |
462 // The m_audioSourceNode is either dead already or it is dying together with | 462 // m_audioSourceNode is explicitly cleared by AudioNode::dispose(). |
463 // this HTMLMediaElement which it strongly keeps alive. | 463 // Since AudioNode::dispose() is guaranteed to be always called before |
464 #if ENABLE(WEB_AUDIO) && !ENABLE(OILPAN) | 464 // the AudioNode is destructed, m_audioSourceNode is explicitly cleared |
| 465 // even if the AudioNode and the HTMLMediaElement die together. |
| 466 #if ENABLE(WEB_AUDIO) |
465 ASSERT(!m_audioSourceNode); | 467 ASSERT(!m_audioSourceNode); |
466 #endif | 468 #endif |
467 clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); | 469 clearMediaPlayerAndAudioSourceProviderClientWithoutLocking(); |
468 | 470 |
469 #if !ENABLE(OILPAN) | 471 #if !ENABLE(OILPAN) |
470 document().decrementLoadEventDelayCount(); | 472 document().decrementLoadEventDelayCount(); |
471 #endif | 473 #endif |
472 } | 474 } |
473 | 475 |
474 #if ENABLE(OILPAN) | 476 #if ENABLE(OILPAN) |
(...skipping 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3987 | 3989 |
3988 #if ENABLE(WEB_AUDIO) | 3990 #if ENABLE(WEB_AUDIO) |
3989 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3991 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
3990 { | 3992 { |
3991 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 3993 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
3992 audioSourceProvider()->setClient(0); | 3994 audioSourceProvider()->setClient(0); |
3993 } | 3995 } |
3994 #endif | 3996 #endif |
3995 | 3997 |
3996 } | 3998 } |
OLD | NEW |