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

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

Issue 178663004: Oilpan: move WorkerGlobalScope to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased 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 "bindings/v8/ScriptObject.h" 33 #include "bindings/v8/ScriptObject.h"
34 #include "core/workers/WorkerClients.h" 34 #include "core/workers/WorkerClients.h"
35 #include "core/workers/WorkerThreadStartupData.h" 35 #include "core/workers/WorkerThreadStartupData.h"
36 #include "modules/serviceworkers/ServiceWorkerThread.h" 36 #include "modules/serviceworkers/ServiceWorkerThread.h"
37 #include "platform/weborigin/KURL.h" 37 #include "platform/weborigin/KURL.h"
38 #include "wtf/CurrentTime.h" 38 #include "wtf/CurrentTime.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 PassRefPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::create(ServiceWor kerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData) 42 PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::creat e(ServiceWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData)
43 { 43 {
44 RefPtr<ServiceWorkerGlobalScope> context = adoptRef(new ServiceWorkerGlobalS cope(startupData->m_scriptURL, startupData->m_userAgent, thread, monotonicallyIn creasingTime(), startupData->m_workerClients.release())); 44 RefPtrWillBeRawPtr<ServiceWorkerGlobalScope> context = adoptRefWillBeRefCoun tedGarbageCollected(new ServiceWorkerGlobalScope(startupData->m_scriptURL, start upData->m_userAgent, thread, monotonicallyIncreasingTime(), startupData->m_worke rClients.release()));
45 45
46 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity Policy, startupData->m_contentSecurityPolicyType); 46 context->applyContentSecurityPolicyFromString(startupData->m_contentSecurity Policy, startupData->m_contentSecurityPolicyType);
47 return context.release(); 47 return context.release();
48 } 48 }
49 49
50 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String & userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<WorkerCl ients> workerClients) : 50 ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String & userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<WorkerCl ients> workerClients) :
51 WorkerGlobalScope(url, userAgent, thread, timeOrigin, workerClients) 51 WorkerGlobalScope(url, userAgent, thread, timeOrigin, workerClients)
52 { 52 {
53 ScriptWrappable::init(this); 53 ScriptWrappable::init(this);
54 } 54 }
55 55
56 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope() 56 ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope()
57 { 57 {
58 } 58 }
59 59
60 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const 60 const AtomicString& ServiceWorkerGlobalScope::interfaceName() const
61 { 61 {
62 return EventTargetNames::ServiceWorkerGlobalScope; 62 return EventTargetNames::ServiceWorkerGlobalScope;
63 } 63 }
64 64
65 void ServiceWorkerGlobalScope::trace(Visitor* visitor)
66 {
67 WorkerGlobalScope::trace(visitor);
68 }
69
65 } // namespace WebCore 70 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerGlobalScope.h ('k') | Source/modules/serviceworkers/ServiceWorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698