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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ASSERT(isRemoved()); 134 ASSERT(isRemoved());
135 ASSERT(!m_loader); 135 ASSERT(!m_loader);
136 ASSERT(!m_stream); 136 ASSERT(!m_stream);
137 ASSERT(!m_webSourceBuffer); 137 ASSERT(!m_webSourceBuffer);
138 #endif 138 #endif
139 WTF_LOG(Media, "SourceBuffer(%p)::~SourceBuffer", this); 139 WTF_LOG(Media, "SourceBuffer(%p)::~SourceBuffer", this);
140 } 140 }
141 141
142 const AtomicString& SourceBuffer::segmentsKeyword() 142 const AtomicString& SourceBuffer::segmentsKeyword()
143 { 143 {
144 DEFINE_STATIC_LOCAL(const AtomicString, segments, ("segments", AtomicString: :ConstructFromLiteral)); 144 DEFINE_STATIC_LOCAL(const AtomicString, segments, ("segments"));
145 return segments; 145 return segments;
146 } 146 }
147 147
148 const AtomicString& SourceBuffer::sequenceKeyword() 148 const AtomicString& SourceBuffer::sequenceKeyword()
149 { 149 {
150 DEFINE_STATIC_LOCAL(const AtomicString, sequence, ("sequence", AtomicString: :ConstructFromLiteral)); 150 DEFINE_STATIC_LOCAL(const AtomicString, sequence, ("sequence"));
151 return sequence; 151 return sequence;
152 } 152 }
153 153
154 void SourceBuffer::setMode(const AtomicString& newMode, ExceptionState& exceptio nState) 154 void SourceBuffer::setMode(const AtomicString& newMode, ExceptionState& exceptio nState)
155 { 155 {
156 WTF_LOG(Media, "SourceBuffer::setMode %p newMode=%s", this, newMode.utf8().d ata()); 156 WTF_LOG(Media, "SourceBuffer::setMode %p newMode=%s", this, newMode.utf8().d ata());
157 // Section 3.1 On setting mode attribute steps. 157 // Section 3.1 On setting mode attribute steps.
158 // 1. Let new mode equal the new value being assigned to this attribute. 158 // 1. Let new mode equal the new value being assigned to this attribute.
159 // 2. If this object has been removed from the sourceBuffers attribute of th e parent media source, then throw 159 // 2. If this object has been removed from the sourceBuffers attribute of th e parent media source, then throw
160 // an INVALID_STATE_ERR exception and abort these steps. 160 // an INVALID_STATE_ERR exception and abort these steps.
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 visitor->trace(m_asyncEventQueue); 871 visitor->trace(m_asyncEventQueue);
872 visitor->trace(m_appendBufferAsyncPartRunner); 872 visitor->trace(m_appendBufferAsyncPartRunner);
873 visitor->trace(m_removeAsyncPartRunner); 873 visitor->trace(m_removeAsyncPartRunner);
874 visitor->trace(m_appendStreamAsyncPartRunner); 874 visitor->trace(m_appendStreamAsyncPartRunner);
875 visitor->trace(m_stream); 875 visitor->trace(m_stream);
876 RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis itor); 876 RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis itor);
877 ActiveDOMObject::trace(visitor); 877 ActiveDOMObject::trace(visitor);
878 } 878 }
879 879
880 } // namespace blink 880 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698