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

Side by Side Diff: runtime/vm/dart_api_message.cc

Issue 1153853002: Fix build bot error. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "vm/dart_api_message.h" 5 #include "vm/dart_api_message.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/snapshot_ids.h" 7 #include "vm/snapshot_ids.h"
8 #include "vm/symbols.h" 8 #include "vm/symbols.h"
9 #include "vm/unicode.h" 9 #include "vm/unicode.h"
10 10
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 RawObject* raw = VmIsolateSnapshotObject(id); 204 RawObject* raw = VmIsolateSnapshotObject(id);
205 intptr_t cid = raw->GetClassId(); 205 intptr_t cid = raw->GetClassId();
206 switch (cid) { 206 switch (cid) {
207 case kOneByteStringCid: { 207 case kOneByteStringCid: {
208 RawOneByteString* raw_str = reinterpret_cast<RawOneByteString*>(raw); 208 RawOneByteString* raw_str = reinterpret_cast<RawOneByteString*>(raw);
209 const char* str = reinterpret_cast<const char*>(raw_str->ptr()->data()); 209 const char* str = reinterpret_cast<const char*>(raw_str->ptr()->data());
210 ASSERT(str != NULL); 210 ASSERT(str != NULL);
211 Dart_CObject* object = NULL; 211 Dart_CObject* object = NULL;
212 for (intptr_t i = 0; i < vm_isolate_references_.length(); i++) { 212 for (intptr_t i = 0; i < vm_isolate_references_.length(); i++) {
213 object = vm_isolate_references_.At(i); 213 object = vm_isolate_references_.At(i);
214 if ((object->type == Dart_CObject_kString)) { 214 if (object->type == Dart_CObject_kString) {
215 if (strcmp(str, const_cast<char*>(object->value.as_string)) == 0) { 215 if (strcmp(str, const_cast<char*>(object->value.as_string)) == 0) {
216 return object; 216 return object;
217 } 217 }
218 } 218 }
219 } 219 }
220 object = CreateDartCObjectString(raw); 220 object = CreateDartCObjectString(raw);
221 vm_isolate_references_.Add(object); 221 vm_isolate_references_.Add(object);
222 return object; 222 return object;
223 } 223 }
224 224
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 if (!success) { 1303 if (!success) {
1304 UnmarkAllCObjects(object); 1304 UnmarkAllCObjects(object);
1305 return false; 1305 return false;
1306 } 1306 }
1307 } 1307 }
1308 UnmarkAllCObjects(object); 1308 UnmarkAllCObjects(object);
1309 return true; 1309 return true;
1310 } 1310 }
1311 1311
1312 } // namespace dart 1312 } // namespace dart
OLDNEW
« 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