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

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

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Created 6 years, 9 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 21 matching lines...) Expand all
32 32
33 #include "modules/serviceworkers/ServiceWorkerThread.h" 33 #include "modules/serviceworkers/ServiceWorkerThread.h"
34 34
35 #include "core/workers/WorkerThreadStartupData.h" 35 #include "core/workers/WorkerThreadStartupData.h"
36 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" 36 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 PassRefPtr<ServiceWorkerThread> ServiceWorkerThread::create(WorkerLoaderProxy& w orkerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerT hreadStartupData> startupData) 40 PassRefPtr<ServiceWorkerThread> ServiceWorkerThread::create(WorkerLoaderProxy& w orkerLoaderProxy, WorkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerT hreadStartupData> startupData)
41 { 41 {
42 return adoptRef(new ServiceWorkerThread(workerLoaderProxy, workerReportingPr oxy, startupData)); 42 // Worker settings has not been passed to ServiceWorker yet.
43 OwnPtr<WorkerSettings> settings = WorkerSettings::create();
44 return adoptRef(new ServiceWorkerThread(workerLoaderProxy, workerReportingPr oxy, settings.release(), startupData));
43 } 45 }
44 46
45 ServiceWorkerThread::ServiceWorkerThread(WorkerLoaderProxy& workerLoaderProxy, W orkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerThreadStartupData> s tartupData) 47 ServiceWorkerThread::ServiceWorkerThread(WorkerLoaderProxy& workerLoaderProxy, W orkerReportingProxy& workerReportingProxy, PassOwnPtr<WorkerSettings> settings, PassOwnPtr<WorkerThreadStartupData> startupData)
46 : WorkerThread(workerLoaderProxy, workerReportingProxy, startupData) 48 : WorkerThread(workerLoaderProxy, workerReportingProxy, settings, startupDat a)
47 { 49 {
48 } 50 }
49 51
50 ServiceWorkerThread::~ServiceWorkerThread() 52 ServiceWorkerThread::~ServiceWorkerThread()
51 { 53 {
52 } 54 }
53 55
54 PassRefPtr<WorkerGlobalScope> ServiceWorkerThread::createWorkerGlobalScope(PassO wnPtr<WorkerThreadStartupData> startupData) 56 PassRefPtr<WorkerGlobalScope> ServiceWorkerThread::createWorkerGlobalScope(PassO wnPtr<WorkerThreadStartupData> startupData)
55 { 57 {
56 return ServiceWorkerGlobalScope::create(this, startupData); 58 return ServiceWorkerGlobalScope::create(this, startupData, *settings());
57 } 59 }
58 60
59 } // namespace WebCore 61 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698