Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 8904ce96bc1c6f41ebd7605b24ee1295a1d70ffa..5cb6af17424197e9f7c8acd78a24473ac0685572 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -327,6 +327,10 @@ HTMLMediaElement::~HTMLMediaElement() |
| // See http://crbug.com/233654 for more details. |
| m_completelyLoaded = true; |
| + // With Oilpan load events on the Document are always delayed during |
| + // sweeping so we don't need to explicitly increment and decrement |
| + // load event delay counts. |
|
haraken
2014/04/24 04:18:43
I don't quite understand this. Do you need to comm
Mads Ager (chromium)
2014/04/24 10:57:36
Yes, have a look at the bug report that is referen
|
| +#if !ENABLE(OILPAN) |
| // Destroying the player may cause a resource load to be canceled, |
| // which could result in Document::dispatchWindowLoadEvent() being |
| // called via ResourceFetch::didLoadResource() then |
| @@ -334,10 +338,13 @@ HTMLMediaElement::~HTMLMediaElement() |
| // object destruction, we use Document::incrementLoadEventDelayCount(). |
| // See http://crbug.com/275223 for more details. |
| document().incrementLoadEventDelayCount(); |
| +#endif |
| clearMediaPlayerAndAudioSourceProviderClient(); |
| +#if !ENABLE(OILPAN) |
| document().decrementLoadEventDelayCount(); |
| +#endif |
| } |
| void HTMLMediaElement::didMoveToNewDocument(Document& oldDocument) |