OLD | NEW |
---|---|
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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 break; | 96 break; |
97 } | 97 } |
98 | 98 |
99 for (++i; i < m_queue.size(); ++i) | 99 for (++i; i < m_queue.size(); ++i) |
100 remaining.append(m_queue[i].release()); | 100 remaining.append(m_queue[i].release()); |
101 m_queue.swap(remaining); | 101 m_queue.swap(remaining); |
102 | 102 |
103 return accumulatedResult; | 103 return accumulatedResult; |
104 } | 104 } |
105 | 105 |
106 bool CustomElementMicrotaskQueue::needsProcessOrStop() const | |
dominicc (has gone to gerrit)
2014/05/12 00:42:18
I think the complexity of Imports has degraded thi
| |
107 { | |
108 for (size_t i = 0; i < m_queue.size(); ++i) { | |
109 if (m_queue[i]->needsProcessOrStop()) | |
110 return true; | |
111 } | |
112 | |
113 return false; | |
114 } | |
115 | |
106 #if !defined(NDEBUG) | 116 #if !defined(NDEBUG) |
107 void CustomElementMicrotaskQueue::show(unsigned indent) | 117 void CustomElementMicrotaskQueue::show(unsigned indent) |
108 { | 118 { |
109 for (unsigned q = 0; q < m_queue.size(); ++q) { | 119 for (unsigned q = 0; q < m_queue.size(); ++q) { |
110 if (m_queue[q]) | 120 if (m_queue[q]) |
111 m_queue[q]->show(indent); | 121 m_queue[q]->show(indent); |
112 else | 122 else |
113 fprintf(stderr, "%*snull\n", indent, ""); | 123 fprintf(stderr, "%*snull\n", indent, ""); |
114 } | 124 } |
115 } | 125 } |
116 #endif | 126 #endif |
117 | 127 |
118 } // namespace WebCore | 128 } // namespace WebCore |
OLD | NEW |