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

Side by Side Diff: runtime/vm/message_handler.h

Issue 1310463005: - Ensure that HandleScope is initialized with a thread. (Remove (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 3 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 | « runtime/vm/isolate.cc ('k') | runtime/vm/metrics_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_MESSAGE_HANDLER_H_ 5 #ifndef VM_MESSAGE_HANDLER_H_
6 #define VM_MESSAGE_HANDLER_H_ 6 #define VM_MESSAGE_HANDLER_H_
7 7
8 #include "vm/isolate.h" 8 #include "vm/isolate.h"
9 #include "vm/message.h" 9 #include "vm/message.h"
10 #include "vm/os_thread.h" 10 #include "vm/os_thread.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 virtual void MessageNotify(Message::Priority priority); 177 virtual void MessageNotify(Message::Priority priority);
178 178
179 // Handles a single message. Provided by subclass. 179 // Handles a single message. Provided by subclass.
180 // 180 //
181 // Returns true on success. 181 // Returns true on success.
182 virtual bool HandleMessage(Message* message) = 0; 182 virtual bool HandleMessage(Message* message) = 0;
183 183
184 virtual void NotifyPauseOnStart() {} 184 virtual void NotifyPauseOnStart() {}
185 virtual void NotifyPauseOnExit() {} 185 virtual void NotifyPauseOnExit() {}
186 186
187 // TODO(iposva): Set a local field before entering MessageHandler methods.
188 Thread* thread() const { return Thread::Current(); }
189
187 private: 190 private:
188 friend class PortMap; 191 friend class PortMap;
189 friend class MessageHandlerTestPeer; 192 friend class MessageHandlerTestPeer;
190 friend class MessageHandlerTask; 193 friend class MessageHandlerTask;
191 194
192 // Called by MessageHandlerTask to process our task queue. 195 // Called by MessageHandlerTask to process our task queue.
193 void TaskCallback(); 196 void TaskCallback();
194 197
195 // Dequeue the next message. Prefer messages from the oob_queue_ to 198 // Dequeue the next message. Prefer messages from the oob_queue_ to
196 // messages from the queue_. 199 // messages from the queue_.
(...skipping 21 matching lines...) Expand all
218 StartCallback start_callback_; 221 StartCallback start_callback_;
219 EndCallback end_callback_; 222 EndCallback end_callback_;
220 CallbackData callback_data_; 223 CallbackData callback_data_;
221 224
222 DISALLOW_COPY_AND_ASSIGN(MessageHandler); 225 DISALLOW_COPY_AND_ASSIGN(MessageHandler);
223 }; 226 };
224 227
225 } // namespace dart 228 } // namespace dart
226 229
227 #endif // VM_MESSAGE_HANDLER_H_ 230 #endif // VM_MESSAGE_HANDLER_H_
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/metrics_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698