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

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

Issue 982873004: Thread/Isolate refactoring: new(Isolate) -> new(Zone) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | runtime/vm/compiler.cc » ('J')
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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 Library::Handle(arguments->isolate()->object_store()->root_library()); 258 Library::Handle(arguments->isolate()->object_store()->root_library());
259 if (!CanonicalizeUri(arguments->isolate(), root_lib, uri, 259 if (!CanonicalizeUri(arguments->isolate(), root_lib, uri,
260 &canonical_uri, &error)) { 260 &canonical_uri, &error)) {
261 const String& msg = String::Handle(String::New(error)); 261 const String& msg = String::Handle(String::New(error));
262 ThrowIsolateSpawnException(msg); 262 ThrowIsolateSpawnException(msg);
263 } 263 }
264 264
265 char* utf8_package_root = NULL; 265 char* utf8_package_root = NULL;
266 if (!package_root.IsNull()) { 266 if (!package_root.IsNull()) {
267 const intptr_t len = Utf8::Length(package_root); 267 const intptr_t len = Utf8::Length(package_root);
268 Zone* zone = isolate->current_zone();
269 utf8_package_root = zone->Alloc<char>(len + 1); 268 utf8_package_root = zone->Alloc<char>(len + 1);
270 package_root.ToUTF8(reinterpret_cast<uint8_t*>(utf8_package_root), len); 269 package_root.ToUTF8(reinterpret_cast<uint8_t*>(utf8_package_root), len);
271 utf8_package_root[len] = '\0'; 270 utf8_package_root[len] = '\0';
272 } 271 }
273 272
274 Spawn(isolate, new IsolateSpawnState(port.Id(), 273 Spawn(isolate, new IsolateSpawnState(port.Id(),
275 canonical_uri, 274 canonical_uri,
276 utf8_package_root, 275 utf8_package_root,
277 args, 276 args,
278 message, 277 message,
(...skipping 24 matching lines...) Expand all
303 MessageWriter writer(&data, &allocator, false); 302 MessageWriter writer(&data, &allocator, false);
304 writer.WriteMessage(msg); 303 writer.WriteMessage(msg);
305 304
306 PortMap::PostMessage(new Message(port.Id(), 305 PortMap::PostMessage(new Message(port.Id(),
307 data, writer.BytesWritten(), 306 data, writer.BytesWritten(),
308 Message::kOOBPriority)); 307 Message::kOOBPriority));
309 return Object::null(); 308 return Object::null();
310 } 309 }
311 310
312 } // namespace dart 311 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/mirrors.cc » ('j') | runtime/vm/compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698