Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: runtime/lib/vmservice.cc

Issue 2206423002: Fix issue 27006 (safepoint assertion failure). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address self review comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/vmservice.cc
diff --git a/runtime/lib/vmservice.cc b/runtime/lib/vmservice.cc
index 584ceb812cdefa3bdb892f5238bb8ed1b342c5df..b4a8b149c383f3ddb7ccf6644f38dacd0b81e613 100644
--- a/runtime/lib/vmservice.cc
+++ b/runtime/lib/vmservice.cc
@@ -416,8 +416,8 @@ DEFINE_NATIVE_ENTRY(VMService_DecodeAssets, 1) {
intptr_t archive_size = archive.Length();
- const Array& result_list = Array::Handle(thread->zone(),
- Array::New(2 * archive_size));
+ Dart_Handle result_list = Dart_NewList(2 * archive_size);
+ ASSERT(!Dart_IsError(result_list));
intptr_t idx = 0;
while (archive.HasMore()) {
@@ -438,14 +438,11 @@ DEFINE_NATIVE_ENTRY(VMService_DecodeAssets, 1) {
Dart_NewWeakPersistentHandle(
dart_contents, contents, contents_length, ContentsFinalizer);
- result_list.SetAt(idx, Api::UnwrapStringHandle(
- thread->zone(), dart_filename));
- result_list.SetAt(idx + 1, Api::UnwrapExternalTypedDataHandle(
- thread->zone(), dart_contents));
+ Dart_ListSetAt(result_list, idx, dart_filename);
+ Dart_ListSetAt(result_list, (idx + 1), dart_contents);
idx += 2;
}
-
- return result_list.raw();
+ return Api::UnwrapArrayHandle(thread->zone(), result_list).raw();
#else
return Object::null();
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698