| OLD | NEW |
| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 args.SetAt(0, message); | 102 args.SetAt(0, message); |
| 103 Exceptions::ThrowByType(Exceptions::kIsolateSpawn, args); | 103 Exceptions::ThrowByType(Exceptions::kIsolateSpawn, args); |
| 104 } | 104 } |
| 105 | 105 |
| 106 | 106 |
| 107 static bool CanonicalizeUri(Isolate* isolate, | 107 static bool CanonicalizeUri(Isolate* isolate, |
| 108 const Library& library, | 108 const Library& library, |
| 109 const String& uri, | 109 const String& uri, |
| 110 char** canonical_uri, | 110 char** canonical_uri, |
| 111 char** error) { | 111 char** error) { |
| 112 VmToNativeTimerScope timer(isolate); |
| 112 Zone* zone = isolate->current_zone(); | 113 Zone* zone = isolate->current_zone(); |
| 113 bool retval = false; | 114 bool retval = false; |
| 114 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); | 115 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); |
| 115 if (handler != NULL) { | 116 if (handler != NULL) { |
| 116 Dart_EnterScope(); | 117 Dart_EnterScope(); |
| 117 Dart_Handle result = handler(Dart_kCanonicalizeUrl, | 118 Dart_Handle result = handler(Dart_kCanonicalizeUrl, |
| 118 Api::NewHandle(isolate, library.raw()), | 119 Api::NewHandle(isolate, library.raw()), |
| 119 Api::NewHandle(isolate, uri.raw())); | 120 Api::NewHandle(isolate, uri.raw())); |
| 120 const Object& obj = Object::Handle(Api::UnwrapHandle(result)); | 121 const Object& obj = Object::Handle(Api::UnwrapHandle(result)); |
| 121 if (obj.IsString()) { | 122 if (obj.IsString()) { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 246 |
| 246 // The control port is being accessed as a regular port from Dart code. This | 247 // The control port is being accessed as a regular port from Dart code. This |
| 247 // is most likely due to the _startIsolate code in dart:isolate. Account for | 248 // is most likely due to the _startIsolate code in dart:isolate. Account for |
| 248 // this by increasing the number of open control ports. | 249 // this by increasing the number of open control ports. |
| 249 isolate->message_handler()->increment_control_ports(); | 250 isolate->message_handler()->increment_control_ports(); |
| 250 | 251 |
| 251 return port.raw(); | 252 return port.raw(); |
| 252 } | 253 } |
| 253 | 254 |
| 254 } // namespace dart | 255 } // namespace dart |
| OLD | NEW |