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

Side by Side Diff: Source/core/html/parser/CompactHTMLToken.cpp

Issue 811863003: replace COMPILE_ASSERT with static_assert in core/html/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 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 20 matching lines...) Expand all
31 31
32 namespace blink { 32 namespace blink {
33 33
34 struct SameSizeAsCompactHTMLToken { 34 struct SameSizeAsCompactHTMLToken {
35 unsigned bitfields; 35 unsigned bitfields;
36 String data; 36 String data;
37 Vector<Attribute> vector; 37 Vector<Attribute> vector;
38 TextPosition textPosition; 38 TextPosition textPosition;
39 }; 39 };
40 40
41 COMPILE_ASSERT(sizeof(CompactHTMLToken) == sizeof(SameSizeAsCompactHTMLToken), C ompactHTMLToken_should_stay_small); 41 static_assert(sizeof(CompactHTMLToken) == sizeof(SameSizeAsCompactHTMLToken), "C ompactHTMLToken should stay small");
42 42
43 CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t extPosition) 43 CompactHTMLToken::CompactHTMLToken(const HTMLToken* token, const TextPosition& t extPosition)
44 : m_type(token->type()) 44 : m_type(token->type())
45 , m_isAll8BitData(false) 45 , m_isAll8BitData(false)
46 , m_doctypeForcesQuirks(false) 46 , m_doctypeForcesQuirks(false)
47 , m_textPosition(textPosition) 47 , m_textPosition(textPosition)
48 { 48 {
49 switch (m_type) { 49 switch (m_type) {
50 case HTMLToken::Uninitialized: 50 case HTMLToken::Uninitialized:
51 ASSERT_NOT_REACHED(); 51 ASSERT_NOT_REACHED();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 for (const Attribute& attribute : m_attributes) { 95 for (const Attribute& attribute : m_attributes) {
96 if (!attribute.name.isSafeToSendToAnotherThread()) 96 if (!attribute.name.isSafeToSendToAnotherThread())
97 return false; 97 return false;
98 if (!attribute.value.isSafeToSendToAnotherThread()) 98 if (!attribute.value.isSafeToSendToAnotherThread())
99 return false; 99 return false;
100 } 100 }
101 return m_data.isSafeToSendToAnotherThread(); 101 return m_data.isSafeToSendToAnotherThread();
102 } 102 }
103 103
104 } 104 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTrackElement.cpp ('k') | Source/core/html/track/vtt/BufferedLineReaderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698