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

Side by Side Diff: runtime/lib/isolate.cc

Issue 1057333004: Continue improving the documentation for the vm service protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/field_view.html » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart.h" 8 #include "vm/dart.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 GET_NON_NULL_NATIVE_ARGUMENT(Bool, paused, arguments->NativeArgAt(3)); 220 GET_NON_NULL_NATIVE_ARGUMENT(Bool, paused, arguments->NativeArgAt(3));
221 if (closure.IsClosure()) { 221 if (closure.IsClosure()) {
222 Function& func = Function::Handle(); 222 Function& func = Function::Handle();
223 func = Closure::function(closure); 223 func = Closure::function(closure);
224 if (func.IsImplicitClosureFunction() && func.is_static()) { 224 if (func.IsImplicitClosureFunction() && func.is_static()) {
225 #if defined(DEBUG) 225 #if defined(DEBUG)
226 Context& ctx = Context::Handle(); 226 Context& ctx = Context::Handle();
227 ctx = Closure::context(closure); 227 ctx = Closure::context(closure);
228 ASSERT(ctx.num_variables() == 0); 228 ASSERT(ctx.num_variables() == 0);
229 #endif 229 #endif
230 // Get the parent function so that we get the right function name.
231 func = func.parent_function();
230 Spawn(isolate, new IsolateSpawnState(port.Id(), 232 Spawn(isolate, new IsolateSpawnState(port.Id(),
231 func, 233 func,
232 message, 234 message,
233 paused.value())); 235 paused.value()));
234 return Object::null(); 236 return Object::null();
235 } 237 }
236 } 238 }
237 const String& msg = String::Handle(String::New( 239 const String& msg = String::Handle(String::New(
238 "Isolate.spawn expects to be passed a static or top-level function")); 240 "Isolate.spawn expects to be passed a static or top-level function"));
239 Exceptions::ThrowArgumentError(msg); 241 Exceptions::ThrowArgumentError(msg);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 MessageWriter writer(&data, &allocator, false); 302 MessageWriter writer(&data, &allocator, false);
301 writer.WriteMessage(msg); 303 writer.WriteMessage(msg);
302 304
303 PortMap::PostMessage(new Message(port.Id(), 305 PortMap::PostMessage(new Message(port.Id(),
304 data, writer.BytesWritten(), 306 data, writer.BytesWritten(),
305 Message::kOOBPriority)); 307 Message::kOOBPriority));
306 return Object::null(); 308 return Object::null();
307 } 309 }
308 310
309 } // namespace dart 311 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/field_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698