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

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

Issue 2905233002: Remove the lifetime hack in ImageLoader where it keeps its assoc element alive (Closed)
Patch Set: Leak Expectation Created 3 years, 7 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 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 3403 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 GetLayoutObject()->UpdateFromElement(); 3414 GetLayoutObject()->UpdateFromElement();
3415 3415
3416 StopPeriodicTimers(); 3416 StopPeriodicTimers();
3417 3417
3418 // Ensure that hasPendingActivity() is not preventing garbage collection, 3418 // Ensure that hasPendingActivity() is not preventing garbage collection,
3419 // since otherwise this media element will simply leak. 3419 // since otherwise this media element will simply leak.
3420 DCHECK(!HasPendingActivity()); 3420 DCHECK(!HasPendingActivity());
3421 } 3421 }
3422 3422
3423 bool HTMLMediaElement::HasPendingActivity() const { 3423 bool HTMLMediaElement::HasPendingActivity() const {
3424 if (HasPendingActivityInternal())
3425 return true;
3426
3424 // The delaying-the-load-event flag is set by resource selection algorithm 3427 // The delaying-the-load-event flag is set by resource selection algorithm
3425 // when looking for a resource to load, before networkState has reached to 3428 // when looking for a resource to load, before networkState has reached to
3426 // kNetworkLoading. 3429 // kNetworkLoading.
3427 if (should_delay_load_event_) 3430 if (should_delay_load_event_)
3428 return true; 3431 return true;
3429 3432
3430 // When networkState is kNetworkLoading, progress and stalled events may be 3433 // When networkState is kNetworkLoading, progress and stalled events may be
3431 // fired. 3434 // fired.
3432 if (network_state_ == kNetworkLoading) 3435 if (network_state_ == kNetworkLoading)
3433 return true; 3436 return true;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
4084 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4087 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4085 } 4088 }
4086 4089
4087 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) { 4090 void HTMLMediaElement::ViewportFillDebouncerTimerFired(TimerBase*) {
4088 mostly_filling_viewport_ = true; 4091 mostly_filling_viewport_ = true;
4089 if (web_media_player_) 4092 if (web_media_player_)
4090 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_); 4093 web_media_player_->BecameDominantVisibleContent(mostly_filling_viewport_);
4091 } 4094 }
4092 4095
4093 } // namespace blink 4096 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698