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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp

Issue 2355723005: Worker: Introduce WorkerReportingProxy::willEvaluateWorkerScript() (Closed)
Patch Set: fix comment Created 4 years, 3 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) 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 , m_scriptCount(0) 92 , m_scriptCount(0)
93 , m_scriptTotalSize(0) 93 , m_scriptTotalSize(0)
94 , m_scriptCachedMetadataTotalSize(0) 94 , m_scriptCachedMetadataTotalSize(0)
95 { 95 {
96 } 96 }
97 97
98 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() 98 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope()
99 { 99 {
100 } 100 }
101 101
102 void ServiceWorkerGlobalScope::didLoadWorkerScript(size_t scriptSize, size_t cac hedMetadataSize) 102 void ServiceWorkerGlobalScope::countScript(size_t scriptSize, size_t cachedMetad ataSize)
103 { 103 {
104 ++m_scriptCount; 104 ++m_scriptCount;
105 m_scriptTotalSize += scriptSize; 105 m_scriptTotalSize += scriptSize;
106 m_scriptCachedMetadataTotalSize += cachedMetadataSize; 106 m_scriptCachedMetadataTotalSize += cachedMetadataSize;
107 } 107 }
108 108
109 void ServiceWorkerGlobalScope::didEvaluateWorkerScript() 109 void ServiceWorkerGlobalScope::didEvaluateWorkerScript()
110 { 110 {
111 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scriptCountHistogram, new CustomCountHistogram("ServiceWorker.ScriptCount", 1, 1000, 50)); 111 DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, scriptCountHistogram, new CustomCountHistogram("ServiceWorker.ScriptCount", 1, 1000, 50));
112 scriptCountHistogram.count(m_scriptCount); 112 scriptCountHistogram.count(m_scriptCount);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event) 222 void ServiceWorkerGlobalScope::exceptionThrown(ErrorEvent* event)
223 { 223 {
224 WorkerGlobalScope::exceptionThrown(event); 224 WorkerGlobalScope::exceptionThrown(event);
225 if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->is olate())) 225 if (WorkerThreadDebugger* debugger = WorkerThreadDebugger::from(thread()->is olate()))
226 debugger->exceptionThrown(event); 226 debugger->exceptionThrown(event);
227 } 227 }
228 228
229 } // namespace blink 229 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698