| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google, Inc. All rights reserved. | 2 * Copyright (C) 2012 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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 return host->useCounter().isCounted(unresolvedProperty); | 1173 return host->useCounter().isCounted(unresolvedProperty); |
| 1174 } | 1174 } |
| 1175 | 1175 |
| 1176 void UseCounter::count(const ExecutionContext* context, Feature feature) { | 1176 void UseCounter::count(const ExecutionContext* context, Feature feature) { |
| 1177 if (!context) | 1177 if (!context) |
| 1178 return; | 1178 return; |
| 1179 if (context->isDocument()) { | 1179 if (context->isDocument()) { |
| 1180 count(*toDocument(context), feature); | 1180 count(*toDocument(context), feature); |
| 1181 return; | 1181 return; |
| 1182 } | 1182 } |
| 1183 if (context->isWorkerGlobalScope()) | 1183 if (context->isWorkerOrWorkletGlobalScope()) |
| 1184 toWorkerGlobalScope(context)->countFeature(feature); | 1184 toWorkerOrWorkletGlobalScope(context)->countFeature(feature); |
| 1185 } | 1185 } |
| 1186 | 1186 |
| 1187 void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, | 1187 void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, |
| 1188 const Frame* frame, | 1188 const Frame* frame, |
| 1189 Feature feature) { | 1189 Feature feature) { |
| 1190 if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) | 1190 if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) |
| 1191 return; | 1191 return; |
| 1192 UseCounter::count(frame, feature); | 1192 UseCounter::count(frame, feature); |
| 1193 } | 1193 } |
| 1194 | 1194 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 } | 1342 } |
| 1343 } | 1343 } |
| 1344 | 1344 |
| 1345 if (needsPagesMeasuredUpdate) | 1345 if (needsPagesMeasuredUpdate) |
| 1346 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); | 1346 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); |
| 1347 | 1347 |
| 1348 m_CSSBits.clearAll(); | 1348 m_CSSBits.clearAll(); |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 } // namespace blink | 1351 } // namespace blink |
| OLD | NEW |