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

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

Issue 1197763002: Oilpan: keep StashedPortCollection always on the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 { 110 {
111 if (Platform* platform = Platform::current()) { 111 if (Platform* platform = Platform::current()) {
112 platform->histogramCustomCounts("ServiceWorker.ScriptCount", m_scriptCou nt, 1, 1000, 50); 112 platform->histogramCustomCounts("ServiceWorker.ScriptCount", m_scriptCou nt, 1, 1000, 50);
113 platform->histogramCustomCounts("ServiceWorker.ScriptTotalSize", m_scrip tTotalSize, 1000, 5000000, 50); 113 platform->histogramCustomCounts("ServiceWorker.ScriptTotalSize", m_scrip tTotalSize, 1000, 5000000, 50);
114 if (m_scriptCachedMetadataTotalSize) 114 if (m_scriptCachedMetadataTotalSize)
115 platform->histogramCustomCounts("ServiceWorker.ScriptCachedMetadataT otalSize", m_scriptCachedMetadataTotalSize, 1000, 50000000, 50); 115 platform->histogramCustomCounts("ServiceWorker.ScriptCachedMetadataT otalSize", m_scriptCachedMetadataTotalSize, 1000, 50000000, 50);
116 } 116 }
117 m_didEvaluateScript = true; 117 m_didEvaluateScript = true;
118 } 118 }
119 119
120 PassRefPtrWillBeRawPtr<StashedPortCollection> ServiceWorkerGlobalScope::ports() 120 StashedPortCollection* ServiceWorkerGlobalScope::ports()
121 { 121 {
122 if (!m_ports) 122 if (!m_ports)
123 m_ports = StashedPortCollection::create(this); 123 m_ports = StashedPortCollection::create(this);
124 return m_ports; 124 return m_ports;
125 } 125 }
126 126
127 ScriptPromise ServiceWorkerGlobalScope::fetch(ScriptState* scriptState, const Re questInfo& input, const Dictionary& init, ExceptionState& exceptionState) 127 ScriptPromise ServiceWorkerGlobalScope::fetch(ScriptState* scriptState, const Re questInfo& input, const Dictionary& init, ExceptionState& exceptionState)
128 { 128 {
129 return GlobalFetch::fetch(scriptState, *this, input, init, exceptionState); 129 return GlobalFetch::fetch(scriptState, *this, input, init, exceptionState);
130 } 130 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta dataSize) 245 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta dataSize)
246 { 246 {
247 ++m_scriptCount; 247 ++m_scriptCount;
248 m_scriptTotalSize += scriptSize; 248 m_scriptTotalSize += scriptSize;
249 m_scriptCachedMetadataTotalSize += cachedMetadataSize; 249 m_scriptCachedMetadataTotalSize += cachedMetadataSize;
250 } 250 }
251 251
252 } // namespace blink 252 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.h ('k') | Source/modules/serviceworkers/StashedPortCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698