| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 args.Add(&message); | 161 args.Add(&message); |
| 162 Exceptions::ThrowByType(Exceptions::kIsolateSpawn, args); | 162 Exceptions::ThrowByType(Exceptions::kIsolateSpawn, args); |
| 163 } | 163 } |
| 164 | 164 |
| 165 | 165 |
| 166 static bool CanonicalizeUri(Isolate* isolate, | 166 static bool CanonicalizeUri(Isolate* isolate, |
| 167 const Library& library, | 167 const Library& library, |
| 168 const String& uri, | 168 const String& uri, |
| 169 char** canonical_uri, | 169 char** canonical_uri, |
| 170 char** error) { | 170 char** error) { |
| 171 StackZone* zone = isolate->current_zone(); | 171 Zone* zone = isolate->current_zone(); |
| 172 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); | 172 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); |
| 173 if (handler == NULL) { | 173 if (handler == NULL) { |
| 174 *error = zone->PrintToString( | 174 *error = zone->PrintToString( |
| 175 "Unable to canonicalize uri '%s': no library tag handler found.", | 175 "Unable to canonicalize uri '%s': no library tag handler found.", |
| 176 uri.ToCString()); | 176 uri.ToCString()); |
| 177 return false; | 177 return false; |
| 178 } | 178 } |
| 179 Dart_Handle result = handler(kCanonicalizeUrl, | 179 Dart_Handle result = handler(kCanonicalizeUrl, |
| 180 Api::NewHandle(isolate, library.raw()), | 180 Api::NewHandle(isolate, library.raw()), |
| 181 Api::NewHandle(isolate, uri.raw())); | 181 Api::NewHandle(isolate, uri.raw())); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { | 439 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { |
| 440 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); | 440 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); |
| 441 if (port.IsError()) { | 441 if (port.IsError()) { |
| 442 Exceptions::PropagateError(Error::Cast(port)); | 442 Exceptions::PropagateError(Error::Cast(port)); |
| 443 } | 443 } |
| 444 return port.raw(); | 444 return port.raw(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 } // namespace dart | 447 } // namespace dart |
| OLD | NEW |