| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 void WorkerGlobalScope::countFeature(UseCounter::Feature) const | 336 void WorkerGlobalScope::countFeature(UseCounter::Feature) const |
| 337 { | 337 { |
| 338 // FIXME: How should we count features for shared/service workers? | 338 // FIXME: How should we count features for shared/service workers? |
| 339 } | 339 } |
| 340 | 340 |
| 341 void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const | 341 void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const |
| 342 { | 342 { |
| 343 // FIXME: How should we count features for shared/service workers? | 343 // FIXME: How should we count features for shared/service workers? |
| 344 | 344 |
| 345 ASSERT(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope()); | 345 ASSERT(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope() || isComp
ositorWorkerGlobalScope()); |
| 346 // For each deprecated feature, send console message at most once | 346 // For each deprecated feature, send console message at most once |
| 347 // per worker lifecycle. | 347 // per worker lifecycle. |
| 348 if (!m_deprecationWarningBits.hasRecordedMeasurement(feature)) { | 348 if (!m_deprecationWarningBits.hasRecordedMeasurement(feature)) { |
| 349 m_deprecationWarningBits.recordMeasurement(feature); | 349 m_deprecationWarningBits.recordMeasurement(feature); |
| 350 ASSERT(!UseCounter::deprecationMessage(feature).isEmpty()); | 350 ASSERT(!UseCounter::deprecationMessage(feature).isEmpty()); |
| 351 ASSERT(executionContext()); | 351 ASSERT(executionContext()); |
| 352 executionContext()->addConsoleMessage(ConsoleMessage::create(Deprecation
MessageSource, WarningMessageLevel, UseCounter::deprecationMessage(feature))); | 352 executionContext()->addConsoleMessage(ConsoleMessage::create(Deprecation
MessageSource, WarningMessageLevel, UseCounter::deprecationMessage(feature))); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 visitor->trace(m_timers); | 387 visitor->trace(m_timers); |
| 388 visitor->trace(m_messageStorage); | 388 visitor->trace(m_messageStorage); |
| 389 visitor->trace(m_pendingMessages); | 389 visitor->trace(m_pendingMessages); |
| 390 HeapSupplementable<WorkerGlobalScope>::trace(visitor); | 390 HeapSupplementable<WorkerGlobalScope>::trace(visitor); |
| 391 #endif | 391 #endif |
| 392 ExecutionContext::trace(visitor); | 392 ExecutionContext::trace(visitor); |
| 393 EventTargetWithInlineData::trace(visitor); | 393 EventTargetWithInlineData::trace(visitor); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace blink | 396 } // namespace blink |
| OLD | NEW |