Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| =================================================================== |
| --- runtime/vm/dart_api_impl.cc (revision 44561) |
| +++ runtime/vm/dart_api_impl.cc (working copy) |
| @@ -1713,15 +1713,17 @@ |
| DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, Dart_Handle obj2, |
| bool* value) { |
| - Isolate* isolate = Isolate::Current(); |
| + Thread* thread = Thread::Current(); |
| + Isolate* isolate = thread->isolate(); |
| + Zone* zone = thread->zone(); |
| DARTSCOPE(isolate); |
| CHECK_CALLBACK_STATE(isolate); |
| const Instance& expected = |
| - Instance::CheckedHandle(isolate, Api::UnwrapHandle(obj1)); |
| + Instance::CheckedHandle(zone, Api::UnwrapHandle(obj1)); |
| const Instance& actual = |
| - Instance::CheckedHandle(isolate, Api::UnwrapHandle(obj2)); |
| + Instance::CheckedHandle(zone, Api::UnwrapHandle(obj2)); |
| const Object& result = |
| - Object::Handle(isolate, DartLibraryCalls::Equals(expected, actual)); |
| + Object::Handle(zone, DartLibraryCalls::Equals(expected, actual)); |
| if (result.IsBool()) { |
| *value = Bool::Cast(result).value(); |
| return Api::Success(); |
| @@ -5005,6 +5007,7 @@ |
| DART_EXPORT Dart_Handle Dart_LoadScriptFromSnapshot(const uint8_t* buffer, |
| intptr_t buffer_len) { |
| Isolate* isolate = Isolate::Current(); |
| + StackZone zone(isolate); |
|
siva
2015/03/19 17:29:48
maybe we should move this after DARTSCOPE, there i
koda
2015/03/19 17:35:41
Done.
|
| DARTSCOPE(isolate); |
| TIMERSCOPE(isolate, time_script_loading); |
| if (buffer == NULL) { |
| @@ -5034,7 +5037,8 @@ |
| SnapshotReader reader(snapshot->content(), |
| snapshot->length(), |
| snapshot->kind(), |
| - isolate); |
| + isolate, |
| + zone.GetZone()); |
| const Object& tmp = Object::Handle(isolate, reader.ReadScriptSnapshot()); |
| if (tmp.IsError()) { |
| return Api::NewHandle(isolate, tmp.raw()); |