Chromium Code Reviews| Index: runtime/vm/dart_api_impl.cc |
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
| index e969b5088c0332c98f9133cc923018fa8fb0ce46..890319c4b351ffda756b2a3226999c5214579488 100644 |
| --- a/runtime/vm/dart_api_impl.cc |
| +++ b/runtime/vm/dart_api_impl.cc |
| @@ -3631,6 +3631,11 @@ DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, |
| } |
| } |
| if (FLAG_verify_acquired_data) { |
| + if (external) { |
|
koda
2015/06/12 18:03:20
This could be written as a single ASSERT(... != ..
siva
2015/06/12 23:10:15
Should we have a check and an explicit error in Da
koda
2015/06/12 23:23:28
Good idea; I'll do it for all the NewExternal* fun
|
| + ASSERT(!isolate->heap()->Contains(reinterpret_cast<uword>(data_tmp))); |
| + } else { |
| + ASSERT(isolate->heap()->Contains(reinterpret_cast<uword>(data_tmp))); |
| + } |
| const Object& obj = Object::Handle(isolate, Api::UnwrapHandle(object)); |
| WeakTable* table = isolate->api_state()->acquired_table(); |
| intptr_t current = table->GetValue(obj.raw()); |