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

Unified Diff: third_party/WebKit/Source/modules/mediasource/MediaSource.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, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp b/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
index 07a8cd6d488bbadd4cb271c74aea98bf441b8518..e64ab877a61cf4f13364c760820f994f3186785d 100644
--- a/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
@@ -69,19 +69,19 @@ static bool throwExceptionIfClosedOrUpdating(bool isOpen, bool isUpdating, Excep
const AtomicString& MediaSource::openKeyword()
{
- DEFINE_STATIC_LOCAL(const AtomicString, open, ("open", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, open, ("open"));
return open;
}
const AtomicString& MediaSource::closedKeyword()
{
- DEFINE_STATIC_LOCAL(const AtomicString, closed, ("closed", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, closed, ("closed"));
return closed;
}
const AtomicString& MediaSource::endedKeyword()
{
- DEFINE_STATIC_LOCAL(const AtomicString, ended, ("ended", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, ended, ("ended"));
return ended;
}
@@ -465,8 +465,8 @@ void MediaSource::setReadyState(const AtomicString& state)
void MediaSource::endOfStream(const AtomicString& error, ExceptionState& exceptionState)
{
- DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::ConstructFromLiteral));
- DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::ConstructFromLiteral));
+ DEFINE_STATIC_LOCAL(const AtomicString, network, ("network"));
+ DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode"));
if (error == network) {
endOfStreamInternal(WebMediaSource::EndOfStreamStatusNetworkError, exceptionState);

Powered by Google App Engine
This is Rietveld 408576698