| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 StringBuilder builder; | 126 StringBuilder builder; |
| 127 | 127 |
| 128 builder.append('{'); | 128 builder.append('{'); |
| 129 HashMap<String, int>::iterator it = m_counterMap.begin(); | 129 HashMap<String, int>::iterator it = m_counterMap.begin(); |
| 130 HashMap<String, int>::iterator itEnd = m_counterMap.end(); | 130 HashMap<String, int>::iterator itEnd = m_counterMap.end(); |
| 131 for (; it != itEnd; ++it) { | 131 for (; it != itEnd; ++it) { |
| 132 if (it != m_counterMap.begin()) | 132 if (it != m_counterMap.begin()) |
| 133 builder.append(','); | 133 builder.append(','); |
| 134 builder.append('"'); | 134 builder.append('"'); |
| 135 builder.append(it->key); | 135 builder.append(it->key); |
| 136 builder.append("\": "); | 136 builder.appendLiteral("\": "); |
| 137 builder.appendNumber(it->value); | 137 builder.appendNumber(it->value); |
| 138 } | 138 } |
| 139 builder.append('}'); | 139 builder.append('}'); |
| 140 | 140 |
| 141 return builder.toString(); | 141 return builder.toString(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 #else | 144 #else |
| 145 | 145 |
| 146 String dumpRefCountedInstanceCounts() | 146 String dumpRefCountedInstanceCounts() |
| 147 { | 147 { |
| 148 return String("{}"); | 148 return String("{}"); |
| 149 } | 149 } |
| 150 | 150 |
| 151 #endif // ENABLE(INSTANCE_COUNTER) | 151 #endif // ENABLE(INSTANCE_COUNTER) |
| 152 | 152 |
| 153 } // namespace WTF | 153 } // namespace WTF |
| OLD | NEW |