OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008, 2010 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 30 matching lines...) Expand all Loading... | |
41 | 41 |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 class ExceptionState; | 44 class ExceptionState; |
45 class ExecutionContext; | 45 class ExecutionContext; |
46 class WorkerGlobalScopeProxy; | 46 class WorkerGlobalScopeProxy; |
47 class WorkerScriptLoader; | 47 class WorkerScriptLoader; |
48 | 48 |
49 class Worker FINAL : public AbstractWorker, public ScriptWrappable, private Work erScriptLoaderClient { | 49 class Worker FINAL : public AbstractWorker, public ScriptWrappable, private Work erScriptLoaderClient { |
50 public: | 50 public: |
51 static PassRefPtr<Worker> create(ExecutionContext*, const String& url, Excep tionState&); | 51 static PassRefPtrWillBeRawPtr<Worker> create(ExecutionContext*, const String & url, ExceptionState&); |
52 virtual ~Worker(); | 52 virtual ~Worker(); |
53 | 53 |
54 virtual const AtomicString& interfaceName() const OVERRIDE; | 54 virtual const AtomicString& interfaceName() const OVERRIDE; |
55 | 55 |
56 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, ExceptionState&); | 56 void postMessage(PassRefPtr<SerializedScriptValue> message, const MessagePor tArray*, ExceptionState&); |
57 | 57 |
58 void terminate(); | 58 void terminate(); |
59 | 59 |
60 virtual void stop() OVERRIDE; | 60 virtual void stop() OVERRIDE; |
61 virtual bool hasPendingActivity() const OVERRIDE; | 61 virtual bool hasPendingActivity() const OVERRIDE; |
62 | 62 |
63 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); | 63 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); |
64 | 64 |
65 void trace(Visitor*); | |
Mads Ager (chromium)
2014/02/24 13:27:53
This will not work if you have a pointer with type
| |
66 | |
65 private: | 67 private: |
66 explicit Worker(ExecutionContext*); | 68 explicit Worker(ExecutionContext*); |
67 | 69 |
68 // WorkerScriptLoaderClient callbacks | 70 // WorkerScriptLoaderClient callbacks |
69 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp onse&) OVERRIDE; | 71 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp onse&) OVERRIDE; |
70 virtual void notifyFinished() OVERRIDE; | 72 virtual void notifyFinished() OVERRIDE; |
71 | 73 |
72 RefPtr<WorkerScriptLoader> m_scriptLoader; | 74 RefPtrWillBeMember<WorkerScriptLoader> m_scriptLoader; |
73 WorkerGlobalScopeProxy* m_contextProxy; // The proxy outlives the worker to perform thread shutdown. | 75 WorkerGlobalScopeProxy* m_contextProxy; // The proxy outlives the worker to perform thread shutdown. |
haraken
2014/02/24 13:28:36
It's not obvious to me that this raw pointer is sa
| |
74 }; | 76 }; |
75 | 77 |
76 } // namespace WebCore | 78 } // namespace WebCore |
77 | 79 |
78 #endif // Worker_h | 80 #endif // Worker_h |
OLD | NEW |