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

Side by Side Diff: Source/core/html/track/TextTrackList.cpp

Issue 25403004: [oilpan] Figure out lifetime of remaining Node raw pointers (Part 2) (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } else if (track->trackType() == TextTrack::InBand) { 174 } else if (track->trackType() == TextTrack::InBand) {
175 // Insert tracks added for in-band in the media file order. 175 // Insert tracks added for in-band in the media file order.
176 size_t index = static_cast<InbandTextTrack*>(track.get())->inbandTrackIn dex(); 176 size_t index = static_cast<InbandTextTrack*>(track.get())->inbandTrackIn dex();
177 m_inbandTracks.insert(index, track); 177 m_inbandTracks.insert(index, track);
178 } else 178 } else
179 ASSERT_NOT_REACHED(); 179 ASSERT_NOT_REACHED();
180 180
181 invalidateTrackIndexesAfterTrack(track.get()); 181 invalidateTrackIndexesAfterTrack(track.get());
182 182
183 ASSERT(!track->mediaElement() || track->mediaElement() == m_owner); 183 ASSERT(!track->mediaElement() || track->mediaElement() == m_owner);
184 track->setMediaElement(Handle<HTMLMediaElement>(m_owner)); 184 track->setMediaElement(adoptRawResult(m_owner));
185 185
186 scheduleAddTrackEvent(track.release()); 186 scheduleAddTrackEvent(track.release());
187 } 187 }
188 188
189 void TextTrackList::remove(TextTrack* track) 189 void TextTrackList::remove(TextTrack* track)
190 { 190 {
191 Vector<RefPtr<TextTrack> >* tracks = 0; 191 Vector<RefPtr<TextTrack> >* tracks = 0;
192 192
193 if (track->trackType() == TextTrack::TrackElement) 193 if (track->trackType() == TextTrack::TrackElement)
194 tracks = &m_elementTracks; 194 tracks = &m_elementTracks;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 size_t count = pendingEvents.size(); 261 size_t count = pendingEvents.size();
262 for (size_t index = 0; index < count; ++index) 262 for (size_t index = 0; index < count; ++index)
263 dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION); 263 dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION);
264 --m_dispatchingEvents; 264 --m_dispatchingEvents;
265 } 265 }
266 266
267 Result<Node> TextTrackList::owner() const 267 Result<Node> TextTrackList::owner() const
268 { 268 {
269 return adoptRawResult(m_owner); 269 return adoptRawResult(m_owner);
270 } 270 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698