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

Side by Side Diff: Source/core/workers/SharedWorker.h

Issue 200373003: Oilpan: make DataObject and SharedWorker heap Supplementables. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing HeapSupplementable<> trace() calls 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
« no previous file with comments | « Source/core/clipboard/DataObject.cpp ('k') | Source/core/workers/SharedWorker.cpp » ('j') | 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2010 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 22 matching lines...) Expand all
33 #define SharedWorker_h 33 #define SharedWorker_h
34 34
35 #include "core/workers/AbstractWorker.h" 35 #include "core/workers/AbstractWorker.h"
36 #include "heap/Handle.h" 36 #include "heap/Handle.h"
37 #include "platform/Supplementable.h" 37 #include "platform/Supplementable.h"
38 38
39 namespace WebCore { 39 namespace WebCore {
40 40
41 class ExceptionState; 41 class ExceptionState;
42 42
43 class SharedWorker FINAL : public AbstractWorker, public ScriptWrappable, public Supplementable<SharedWorker> { 43 class SharedWorker FINAL : public AbstractWorker, public ScriptWrappable, public WillBeHeapSupplementable<SharedWorker> {
44 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SharedWorker);
44 public: 45 public:
45 static PassRefPtrWillBeRawPtr<SharedWorker> create(ExecutionContext*, const String& url, const String& name, ExceptionState&); 46 static PassRefPtrWillBeRawPtr<SharedWorker> create(ExecutionContext*, const String& url, const String& name, ExceptionState&);
46 virtual ~SharedWorker(); 47 virtual ~SharedWorker();
47 48
48 MessagePort* port() const { return m_port.get(); } 49 MessagePort* port() const { return m_port.get(); }
49 50
50 virtual const AtomicString& interfaceName() const OVERRIDE; 51 virtual const AtomicString& interfaceName() const OVERRIDE;
51 52
52 // Prevents this SharedWorker + JS wrapper from being garbage collected. 53 // Prevents this SharedWorker + JS wrapper from being garbage collected.
53 void setPreventGC(); 54 void setPreventGC();
54 // Allows this SharedWorker + JS wrapper to be garbage collected. 55 // Allows this SharedWorker + JS wrapper to be garbage collected.
55 void unsetPreventGC(); 56 void unsetPreventGC();
56 57
57 virtual void trace(Visitor*) OVERRIDE; 58 virtual void trace(Visitor*) OVERRIDE;
58 59
59 private: 60 private:
60 explicit SharedWorker(ExecutionContext*); 61 explicit SharedWorker(ExecutionContext*);
61 62
62 RefPtr<MessagePort> m_port; 63 RefPtr<MessagePort> m_port;
63 }; 64 };
64 65
65 } // namespace WebCore 66 } // namespace WebCore
66 67
67 #endif // SharedWorker_h 68 #endif // SharedWorker_h
OLDNEW
« no previous file with comments | « Source/core/clipboard/DataObject.cpp ('k') | Source/core/workers/SharedWorker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698