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

Side by Side Diff: Source/core/workers/WorkerThread.cpp

Issue 1059193002: Add UMA to understand the typical total size of ServiceWorker script [1/2 blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: check Platform::current() Created 5 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 * 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 m_workerReportingProxy.workerThreadTerminated(); 316 m_workerReportingProxy.workerThreadTerminated();
317 return; 317 return;
318 } 318 }
319 319
320 m_microtaskRunner = adoptPtr(new MicrotaskRunner(this)); 320 m_microtaskRunner = adoptPtr(new MicrotaskRunner(this));
321 m_thread->addTaskObserver(m_microtaskRunner.get()); 321 m_thread->addTaskObserver(m_microtaskRunner.get());
322 m_thread->attachGC(); 322 m_thread->attachGC();
323 323
324 m_isolate = initializeIsolate(); 324 m_isolate = initializeIsolate();
325 m_workerGlobalScope = createWorkerGlobalScope(m_startupData.release()); 325 m_workerGlobalScope = createWorkerGlobalScope(m_startupData.release());
326 m_workerGlobalScope->scriptLoaded(sourceCode.length(), cachedMetaData.ge t() ? cachedMetaData->size() : 0);
326 327
327 PlatformThreadData::current().threadTimers().setSharedTimer(adoptPtr(new WorkerSharedTimer(this))); 328 PlatformThreadData::current().threadTimers().setSharedTimer(adoptPtr(new WorkerSharedTimer(this)));
328 } 329 }
329 330
330 // The corresponding call to stopRunLoop() is in ~WorkerScriptController(). 331 // The corresponding call to stopRunLoop() is in ~WorkerScriptController().
331 didStartRunLoop(); 332 didStartRunLoop();
332 333
333 // Notify proxy that a new WorkerGlobalScope has been created and started. 334 // Notify proxy that a new WorkerGlobalScope has been created and started.
334 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get()); 335 m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get());
335 336
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get()); 610 InspectorInstrumentation::didLeaveNestedRunLoop(m_workerGlobalScope.get());
610 } 611 }
611 612
612 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController) 613 void WorkerThread::setWorkerInspectorController(WorkerInspectorController* worke rInspectorController)
613 { 614 {
614 MutexLocker locker(m_workerInspectorControllerMutex); 615 MutexLocker locker(m_workerInspectorControllerMutex);
615 m_workerInspectorController = workerInspectorController; 616 m_workerInspectorController = workerInspectorController;
616 } 617 }
617 618
618 } // namespace blink 619 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/modules/serviceworkers/ServiceWorkerGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698