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

Side by Side Diff: Source/modules/serviceworkers/ServiceWorker.h

Issue 1156303010: Oilpan: provide eager 'operator new' overload for ServiceWorker. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class MODULES_EXPORT ServiceWorker final : public AbstractWorker, public WebServ iceWorkerProxy { 49 class MODULES_EXPORT ServiceWorker final : public AbstractWorker, public WebServ iceWorkerProxy {
50 DEFINE_WRAPPERTYPEINFO(); 50 DEFINE_WRAPPERTYPEINFO();
51 public: 51 public:
52 typedef WebServiceWorker WebType; 52 typedef WebServiceWorker WebType;
53 static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType *); 53 static PassRefPtrWillBeRawPtr<ServiceWorker> from(ExecutionContext*, WebType *);
54 54
55 ~ServiceWorker() override; 55 ~ServiceWorker() override;
56 56
57 // Eager finalization needed to promptly release owned WebServiceWorker. 57 // Eager finalization needed to promptly release owned WebServiceWorker.
58 EAGERLY_FINALIZE(); 58 EAGERLY_FINALIZE();
59 // Override 'operator new' to enforce allocation of eagerly finalized object .
60 DECLARE_EAGER_FINALIZATION_OPERATOR_NEW();
59 61
60 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&); 62 void postMessage(ExecutionContext*, PassRefPtr<SerializedScriptValue> messag e, const MessagePortArray*, ExceptionState&);
61 void terminate(ExceptionState&); 63 void terminate(ExceptionState&);
62 64
63 String scriptURL() const; 65 String scriptURL() const;
64 String state() const; 66 String state() const;
65 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange); 67 DEFINE_ATTRIBUTE_EVENT_LISTENER(statechange);
66 68
67 // WebServiceWorkerProxy overrides. 69 // WebServiceWorkerProxy overrides.
68 virtual void dispatchStateChangeEvent() override; 70 virtual void dispatchStateChangeEvent() override;
(...skipping 10 matching lines...) Expand all
79 virtual bool hasPendingActivity() const override; 81 virtual bool hasPendingActivity() const override;
80 virtual void stop() override; 82 virtual void stop() override;
81 83
82 OwnPtr<WebServiceWorker> m_outerWorker; 84 OwnPtr<WebServiceWorker> m_outerWorker;
83 bool m_wasStopped; 85 bool m_wasStopped;
84 }; 86 };
85 87
86 } // namespace blink 88 } // namespace blink
87 89
88 #endif // ServiceWorker_h 90 #endif // ServiceWorker_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698