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

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

Issue 1228833004: Oilpan: Move CachedMetadataHandler to Oilpan heap on Oilpan-enabled world. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move #if directives. Created 5 years, 5 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 void ServiceWorkerGlobalScope::importScripts(const Vector<String>& urls, Excepti onState& exceptionState) 222 void ServiceWorkerGlobalScope::importScripts(const Vector<String>& urls, Excepti onState& exceptionState)
223 { 223 {
224 // Bust the MemoryCache to ensure script requests reach the browser-side 224 // Bust the MemoryCache to ensure script requests reach the browser-side
225 // and get added to and retrieved from the ServiceWorker's script cache. 225 // and get added to and retrieved from the ServiceWorker's script cache.
226 // FIXME: Revisit in light of the solution to crbug/388375. 226 // FIXME: Revisit in light of the solution to crbug/388375.
227 for (Vector<String>::const_iterator it = urls.begin(); it != urls.end(); ++i t) 227 for (Vector<String>::const_iterator it = urls.begin(); it != urls.end(); ++i t)
228 executionContext()->removeURLFromMemoryCache(completeURL(*it)); 228 executionContext()->removeURLFromMemoryCache(completeURL(*it));
229 WorkerGlobalScope::importScripts(urls, exceptionState); 229 WorkerGlobalScope::importScripts(urls, exceptionState);
230 } 230 }
231 231
232 PassOwnPtr<CachedMetadataHandler> ServiceWorkerGlobalScope::createWorkerScriptCa chedMetadataHandler(const KURL& scriptURL, const Vector<char>* metaData) 232 PassOwnPtrWillBeRawPtr<CachedMetadataHandler> ServiceWorkerGlobalScope::createWo rkerScriptCachedMetadataHandler(const KURL& scriptURL, const Vector<char>* metaD ata)
233 { 233 {
234 return ServiceWorkerScriptCachedMetadataHandler::create(this, scriptURL, met aData); 234 return ServiceWorkerScriptCachedMetadataHandler::create(this, scriptURL, met aData);
235 } 235 }
236 236
237 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe fPtrWillBeRawPtr<ScriptCallStack> callStack) 237 void ServiceWorkerGlobalScope::logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRe fPtrWillBeRawPtr<ScriptCallStack> callStack)
238 { 238 {
239 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack); 239 WorkerGlobalScope::logExceptionToConsole(errorMessage, scriptId, sourceURL, lineNumber, columnNumber, callStack);
240 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); 240 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber);
241 consoleMessage->setScriptId(scriptId); 241 consoleMessage->setScriptId(scriptId);
242 consoleMessage->setCallStack(callStack); 242 consoleMessage->setCallStack(callStack);
243 addMessageToWorkerConsole(consoleMessage.release()); 243 addMessageToWorkerConsole(consoleMessage.release());
244 } 244 }
245 245
246 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta dataSize) 246 void ServiceWorkerGlobalScope::scriptLoaded(size_t scriptSize, size_t cachedMeta dataSize)
247 { 247 {
248 ++m_scriptCount; 248 ++m_scriptCount;
249 m_scriptTotalSize += scriptSize; 249 m_scriptTotalSize += scriptSize;
250 m_scriptCachedMetadataTotalSize += cachedMetadataSize; 250 m_scriptCachedMetadataTotalSize += cachedMetadataSize;
251 } 251 }
252 252
253 } // namespace blink 253 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698