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

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

Issue 177073004: Oilpan: move core/workers to oilpan's heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #ifndef AbstractWorker_h 31 #ifndef AbstractWorker_h
32 #define AbstractWorker_h 32 #define AbstractWorker_h
33 33
34 #include "bindings/v8/ScriptWrappable.h" 34 #include "bindings/v8/ScriptWrappable.h"
35 #include "core/dom/ActiveDOMObject.h" 35 #include "core/dom/ActiveDOMObject.h"
36 #include "core/events/EventListener.h" 36 #include "core/events/EventListener.h"
37 #include "core/events/EventTarget.h" 37 #include "core/events/EventTarget.h"
38 #include "core/events/ThreadLocalEventNames.h" 38 #include "core/events/ThreadLocalEventNames.h"
39 #include "heap/Handle.h"
39 #include "wtf/PassRefPtr.h" 40 #include "wtf/PassRefPtr.h"
40 #include "wtf/RefCounted.h" 41 #include "wtf/RefCounted.h"
41 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
42 #include "wtf/text/AtomicStringHash.h" 43 #include "wtf/text/AtomicStringHash.h"
43 44
44 namespace WebCore { 45 namespace WebCore {
45 46
46 class ExceptionState; 47 class ExceptionState;
47 class KURL; 48 class KURL;
48 class ExecutionContext; 49 class ExecutionContext;
49 50
50 class AbstractWorker : public RefCounted<AbstractWorker>, public EventTargetWith InlineData, public ActiveDOMObject { 51 class AbstractWorker : public RefCountedWillBeRefCountedGarbageCollected<Abstrac tWorker>, public EventTargetWithInlineData, public ActiveDOMObject {
51 REFCOUNTED_EVENT_TARGET(AbstractWorker); 52 DECLARE_GC_INFO;
53 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<A bstractWorker>);
52 public: 54 public:
53 // EventTarget APIs 55 // EventTarget APIs
54 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return A ctiveDOMObject::executionContext(); } 56 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return A ctiveDOMObject::executionContext(); }
55 57
56 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(error); 58 DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(error);
57 59
58 AbstractWorker(ExecutionContext*); 60 AbstractWorker(ExecutionContext*);
59 virtual ~AbstractWorker(); 61 virtual ~AbstractWorker();
60 62
63 void trace(Visitor*) { }
Mads Ager (chromium) 2014/02/24 13:27:53 Please make this one virtual and implement it in a
haraken 2014/02/24 13:28:36 This should be: virtual void trace(Visitor*) = 0.
64
61 protected: 65 protected:
62 // Helper function that converts a URL to an absolute URL and checks the res ult for validity. 66 // Helper function that converts a URL to an absolute URL and checks the res ult for validity.
63 KURL resolveURL(const String& url, ExceptionState&); 67 KURL resolveURL(const String& url, ExceptionState&);
64 intptr_t asID() const { return reinterpret_cast<intptr_t>(this); } 68 intptr_t asID() const { return reinterpret_cast<intptr_t>(this); }
65 }; 69 };
66 70
67 } // namespace WebCore 71 } // namespace WebCore
68 72
69 #endif // AbstractWorker_h 73 #endif // AbstractWorker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698