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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp

Issue 1897193002: Worker: Rename worker components to clarify what they work for (part 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 336
337 void WorkerGlobalScope::deregisterEventListener(V8AbstractEventListener* eventLi stener) 337 void WorkerGlobalScope::deregisterEventListener(V8AbstractEventListener* eventLi stener)
338 { 338 {
339 auto it = m_eventListeners.find(eventListener); 339 auto it = m_eventListeners.find(eventListener);
340 RELEASE_ASSERT(it != m_eventListeners.end()); 340 RELEASE_ASSERT(it != m_eventListeners.end());
341 m_eventListeners.remove(it); 341 m_eventListeners.remove(it);
342 } 342 }
343 343
344 void WorkerGlobalScope::countFeature(UseCounter::Feature) const 344 void WorkerGlobalScope::countFeature(UseCounter::Feature) const
345 { 345 {
346 // FIXME: How should we count features for shared/service workers? 346 // TODO(nhiroki): How should we count features for shared/service workers?
347 // (http://crbug.com/376039)
347 } 348 }
348 349
349 void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const 350 void WorkerGlobalScope::countDeprecation(UseCounter::Feature feature) const
350 { 351 {
351 // FIXME: How should we count features for shared/service workers? 352 // TODO(nhiroki): How should we count features for shared/service workers?
353 // (http://crbug.com/376039)
352 354
353 ASSERT(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope() || isComp ositorWorkerGlobalScope()); 355 ASSERT(isSharedWorkerGlobalScope() || isServiceWorkerGlobalScope() || isComp ositorWorkerGlobalScope());
354 // For each deprecated feature, send console message at most once 356 // For each deprecated feature, send console message at most once
355 // per worker lifecycle. 357 // per worker lifecycle.
356 if (!m_deprecationWarningBits.hasRecordedMeasurement(feature)) { 358 if (!m_deprecationWarningBits.hasRecordedMeasurement(feature)) {
357 m_deprecationWarningBits.recordMeasurement(feature); 359 m_deprecationWarningBits.recordMeasurement(feature);
358 ASSERT(!Deprecation::deprecationMessage(feature).isEmpty()); 360 ASSERT(!Deprecation::deprecationMessage(feature).isEmpty());
359 ASSERT(getExecutionContext()); 361 ASSERT(getExecutionContext());
360 getExecutionContext()->addConsoleMessage(ConsoleMessage::create(Deprecat ionMessageSource, WarningMessageLevel, Deprecation::deprecationMessage(feature)) ); 362 getExecutionContext()->addConsoleMessage(ConsoleMessage::create(Deprecat ionMessageSource, WarningMessageLevel, Deprecation::deprecationMessage(feature)) );
361 } 363 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 visitor->trace(m_messageStorage); 426 visitor->trace(m_messageStorage);
425 visitor->trace(m_pendingMessages); 427 visitor->trace(m_pendingMessages);
426 visitor->trace(m_eventListeners); 428 visitor->trace(m_eventListeners);
427 ExecutionContext::trace(visitor); 429 ExecutionContext::trace(visitor);
428 EventTargetWithInlineData::trace(visitor); 430 EventTargetWithInlineData::trace(visitor);
429 SecurityContext::trace(visitor); 431 SecurityContext::trace(visitor);
430 Supplementable<WorkerGlobalScope>::trace(visitor); 432 Supplementable<WorkerGlobalScope>::trace(visitor);
431 } 433 }
432 434
433 } // namespace blink 435 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698