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

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

Issue 339843002: Oilpan: Mark TrackDisplayUpdateScope STACK_ALLOCATED (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 static void removeElementFromDocumentMap(HTMLMediaElement* element, Document* do cument) 144 static void removeElementFromDocumentMap(HTMLMediaElement* element, Document* do cument)
145 { 145 {
146 DocumentElementSetMap& map = documentToElementSetMap(); 146 DocumentElementSetMap& map = documentToElementSetMap();
147 WeakMediaElementSet set = map.take(document); 147 WeakMediaElementSet set = map.take(document);
148 set.remove(element); 148 set.remove(element);
149 if (!set.isEmpty()) 149 if (!set.isEmpty())
150 map.add(document, set); 150 map.add(document, set);
151 } 151 }
152 152
153 class TrackDisplayUpdateScope { 153 class TrackDisplayUpdateScope {
154 STACK_ALLOCATED();
154 public: 155 public:
155 TrackDisplayUpdateScope(HTMLMediaElement* mediaElement) 156 TrackDisplayUpdateScope(HTMLMediaElement* mediaElement)
156 { 157 {
157 m_mediaElement = mediaElement; 158 m_mediaElement = mediaElement;
158 m_mediaElement->beginIgnoringTrackDisplayUpdateRequests(); 159 m_mediaElement->beginIgnoringTrackDisplayUpdateRequests();
159 } 160 }
160 ~TrackDisplayUpdateScope() 161 ~TrackDisplayUpdateScope()
161 { 162 {
162 ASSERT(m_mediaElement); 163 ASSERT(m_mediaElement);
163 m_mediaElement->endIgnoringTrackDisplayUpdateRequests(); 164 m_mediaElement->endIgnoringTrackDisplayUpdateRequests();
164 } 165 }
165 166
166 private: 167 private:
167 HTMLMediaElement* m_mediaElement; 168 RawPtrWillBeMember<HTMLMediaElement> m_mediaElement;
168 }; 169 };
169 170
170 static const AtomicString& AudioKindToString(WebMediaPlayerClient::AudioTrackKin d kind) 171 static const AtomicString& AudioKindToString(WebMediaPlayerClient::AudioTrackKin d kind)
171 { 172 {
172 switch (kind) { 173 switch (kind) {
173 case WebMediaPlayerClient::AudioTrackKindNone: 174 case WebMediaPlayerClient::AudioTrackKindNone:
174 return emptyAtom; 175 return emptyAtom;
175 case WebMediaPlayerClient::AudioTrackKindAlternative: 176 case WebMediaPlayerClient::AudioTrackKindAlternative:
176 return AudioTrack::alternativeKeyword(); 177 return AudioTrack::alternativeKeyword();
177 case WebMediaPlayerClient::AudioTrackKindDescriptions: 178 case WebMediaPlayerClient::AudioTrackKindDescriptions:
(...skipping 3771 matching lines...) Expand 10 before | Expand all | Expand 10 after
3949 3950
3950 #if ENABLE(WEB_AUDIO) 3951 #if ENABLE(WEB_AUDIO)
3951 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3952 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3952 { 3953 {
3953 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3954 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3954 audioSourceProvider()->setClient(0); 3955 audioSourceProvider()->setClient(0);
3955 } 3956 }
3956 #endif 3957 #endif
3957 3958
3958 } 3959 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698