| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 , m_sentStalledEvent(false) | 275 , m_sentStalledEvent(false) |
| 276 , m_sentEndEvent(false) | 276 , m_sentEndEvent(false) |
| 277 , m_pausedInternal(false) | 277 , m_pausedInternal(false) |
| 278 , m_closedCaptionsVisible(false) | 278 , m_closedCaptionsVisible(false) |
| 279 , m_completelyLoaded(false) | 279 , m_completelyLoaded(false) |
| 280 , m_havePreparedToPlay(false) | 280 , m_havePreparedToPlay(false) |
| 281 , m_delayingLoadForPreloadNone(false) | 281 , m_delayingLoadForPreloadNone(false) |
| 282 , m_tracksAreReady(true) | 282 , m_tracksAreReady(true) |
| 283 , m_haveVisibleTextTrack(false) | 283 , m_haveVisibleTextTrack(false) |
| 284 , m_processingPreferenceChange(false) | 284 , m_processingPreferenceChange(false) |
| 285 #if ENABLE(OILPAN) |
| 286 , m_isFinalizing(false) |
| 287 #endif |
| 285 , m_lastTextTrackUpdateTime(-1) | 288 , m_lastTextTrackUpdateTime(-1) |
| 286 , m_textTracks(nullptr) | 289 , m_textTracks(nullptr) |
| 287 , m_ignoreTrackDisplayUpdate(0) | 290 , m_ignoreTrackDisplayUpdate(0) |
| 288 #if ENABLE(WEB_AUDIO) | 291 #if ENABLE(WEB_AUDIO) |
| 289 , m_audioSourceNode(0) | 292 , m_audioSourceNode(0) |
| 290 #endif | 293 #endif |
| 291 { | 294 { |
| 292 ASSERT(RuntimeEnabledFeatures::mediaEnabled()); | 295 ASSERT(RuntimeEnabledFeatures::mediaEnabled()); |
| 293 | 296 |
| 294 WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement"); | 297 WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement"); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 #if !ENABLE(OILPAN) | 359 #if !ENABLE(OILPAN) |
| 357 // Destroying the player may cause a resource load to be canceled, | 360 // Destroying the player may cause a resource load to be canceled, |
| 358 // which could result in Document::dispatchWindowLoadEvent() being | 361 // which could result in Document::dispatchWindowLoadEvent() being |
| 359 // called via ResourceFetch::didLoadResource() then | 362 // called via ResourceFetch::didLoadResource() then |
| 360 // FrameLoader::loadDone(). To prevent load event dispatching during | 363 // FrameLoader::loadDone(). To prevent load event dispatching during |
| 361 // object destruction, we use Document::incrementLoadEventDelayCount(). | 364 // object destruction, we use Document::incrementLoadEventDelayCount(). |
| 362 // See http://crbug.com/275223 for more details. | 365 // See http://crbug.com/275223 for more details. |
| 363 document().incrementLoadEventDelayCount(); | 366 document().incrementLoadEventDelayCount(); |
| 364 #endif | 367 #endif |
| 365 | 368 |
| 369 #if ENABLE(OILPAN) |
| 370 // Oilpan: the player must be released, but the player object |
| 371 // cannot safely access this player client any longer as parts of |
| 372 // it may have been finalized already (like the media element's |
| 373 // supplementable table.) Handled for now by entering an |
| 374 // is-finalizing state, which is explicitly checked for if the |
| 375 // player tries to access the media element during shutdown. |
| 376 // |
| 377 // FIXME: Oilpan: move the media player to the heap instead and |
| 378 // avoid having to finalize it from here; this whole #if block |
| 379 // could then be removed (along with the state bit it depends on.) |
| 380 // crbug.com/378229 |
| 381 m_isFinalizing = true; |
| 382 #endif |
| 366 clearMediaPlayerAndAudioSourceProviderClient(); | 383 clearMediaPlayerAndAudioSourceProviderClient(); |
| 367 | 384 |
| 368 #if !ENABLE(OILPAN) | 385 #if !ENABLE(OILPAN) |
| 369 document().decrementLoadEventDelayCount(); | 386 document().decrementLoadEventDelayCount(); |
| 370 #endif | 387 #endif |
| 371 } | 388 } |
| 372 | 389 |
| 373 void HTMLMediaElement::didMoveToNewDocument(Document& oldDocument) | 390 void HTMLMediaElement::didMoveToNewDocument(Document& oldDocument) |
| 374 { | 391 { |
| 375 WTF_LOG(Media, "HTMLMediaElement::didMoveToNewDocument"); | 392 WTF_LOG(Media, "HTMLMediaElement::didMoveToNewDocument"); |
| (...skipping 3273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3649 visitor->trace(m_error); | 3666 visitor->trace(m_error); |
| 3650 visitor->trace(m_currentSourceNode); | 3667 visitor->trace(m_currentSourceNode); |
| 3651 visitor->trace(m_nextChildNodeToConsider); | 3668 visitor->trace(m_nextChildNodeToConsider); |
| 3652 visitor->trace(m_textTracks); | 3669 visitor->trace(m_textTracks); |
| 3653 visitor->trace(m_textTracksWhenResourceSelectionBegan); | 3670 visitor->trace(m_textTracksWhenResourceSelectionBegan); |
| 3654 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); | 3671 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); |
| 3655 HTMLElement::trace(visitor); | 3672 HTMLElement::trace(visitor); |
| 3656 } | 3673 } |
| 3657 | 3674 |
| 3658 } | 3675 } |
| OLD | NEW |