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

Side by Side Diff: Source/core/html/parser/BackgroundHTMLInputStream.h

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | « Source/core/frame/FrameView.cpp ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | 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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 size_t totalCheckpointTokenCount() const { return m_totalCheckpointTokenCoun t; } 53 size_t totalCheckpointTokenCount() const { return m_totalCheckpointTokenCoun t; }
54 54
55 private: 55 private:
56 struct Checkpoint { 56 struct Checkpoint {
57 Checkpoint(const SegmentedString& i, size_t n, size_t t) : input(i), num berOfSegmentsAlreadyAppended(n), tokensExtractedSincePreviousCheckpoint(t) { } 57 Checkpoint(const SegmentedString& i, size_t n, size_t t) : input(i), num berOfSegmentsAlreadyAppended(n), tokensExtractedSincePreviousCheckpoint(t) { }
58 58
59 SegmentedString input; 59 SegmentedString input;
60 size_t numberOfSegmentsAlreadyAppended; 60 size_t numberOfSegmentsAlreadyAppended;
61 size_t tokensExtractedSincePreviousCheckpoint; 61 size_t tokensExtractedSincePreviousCheckpoint;
62 62
63 #ifndef NDEBUG 63 #if ENABLE(ASSERT)
64 bool isNull() const { return input.isEmpty() && !numberOfSegmentsAlready Appended; } 64 bool isNull() const { return input.isEmpty() && !numberOfSegmentsAlready Appended; }
65 #endif 65 #endif
66 void clear() { input.clear(); numberOfSegmentsAlreadyAppended = 0; token sExtractedSincePreviousCheckpoint = 0;} 66 void clear() { input.clear(); numberOfSegmentsAlreadyAppended = 0; token sExtractedSincePreviousCheckpoint = 0;}
67 }; 67 };
68 68
69 SegmentedString m_current; 69 SegmentedString m_current;
70 Vector<String> m_segments; 70 Vector<String> m_segments;
71 Vector<Checkpoint> m_checkpoints; 71 Vector<Checkpoint> m_checkpoints;
72 72
73 // Note: These indicies may === vector.size(), in which case there are no va lid checkpoints/segments at this time. 73 // Note: These indicies may === vector.size(), in which case there are no va lid checkpoints/segments at this time.
74 size_t m_firstValidCheckpointIndex; 74 size_t m_firstValidCheckpointIndex;
75 size_t m_firstValidSegmentIndex; 75 size_t m_firstValidSegmentIndex;
76 size_t m_totalCheckpointTokenCount; 76 size_t m_totalCheckpointTokenCount;
77 77
78 void updateTotalCheckpointTokenCount(); 78 void updateTotalCheckpointTokenCount();
79 }; 79 };
80 80
81 } 81 }
82 82
83 #endif 83 #endif
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/html/parser/BackgroundHTMLParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698