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