| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 PortMap::PostMessage(new Message(send_id.Value(), reply_id.Value(), | 145 PortMap::PostMessage(new Message(send_id.Value(), reply_id.Value(), |
| 146 data, writer.BytesWritten(), | 146 data, writer.BytesWritten(), |
| 147 Message::kNormalPriority)); | 147 Message::kNormalPriority)); |
| 148 return Object::null(); | 148 return Object::null(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 | 151 |
| 152 static void ThrowIllegalArgException(const String& message) { | 152 static void ThrowIllegalArgException(const String& message) { |
| 153 GrowableArray<const Object*> args(1); | 153 GrowableArray<const Object*> args(1); |
| 154 args.Add(&message); | 154 args.Add(&message); |
| 155 Exceptions::ThrowByType(Exceptions::kIllegalArgument, args); | 155 Exceptions::ThrowByType(Exceptions::kArgument, args); |
| 156 } | 156 } |
| 157 | 157 |
| 158 | 158 |
| 159 static void ThrowIsolateSpawnException(const String& message) { | 159 static void ThrowIsolateSpawnException(const String& message) { |
| 160 GrowableArray<const Object*> args(1); | 160 GrowableArray<const Object*> args(1); |
| 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 |
| (...skipping 272 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 |