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

Side by Side Diff: runtime/bin/dartutils.cc

Issue 1526123002: VM: Const-correctness fixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | runtime/bin/socket.h » ('j') | 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 "bin/dartutils.h" 5 #include "bin/dartutils.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "include/dart_tools_api.h" 8 #include "include/dart_tools_api.h"
9 #include "include/dart_native_api.h" 9 #include "include/dart_native_api.h"
10 10
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 Dart_Handle library = Dart_LookupLibrary(library_uri); 601 Dart_Handle library = Dart_LookupLibrary(library_uri);
602 if (Dart_IsError(library)) { 602 if (Dart_IsError(library)) {
603 Dart_PropagateError(library); 603 Dart_PropagateError(library);
604 } 604 }
605 result = Dart_LoadSource(library, resolved_script_uri, source, 0, 0); 605 result = Dart_LoadSource(library, resolved_script_uri, source, 0, 0);
606 } 606 }
607 } 607 }
608 } 608 }
609 609
610 if (buffer_copy != NULL) { 610 if (buffer_copy != NULL) {
611 free(const_cast<uint8_t *>(buffer_copy)); 611 free(buffer_copy);
612 } 612 }
613 613
614 if (Dart_IsError(result)) { 614 if (Dart_IsError(result)) {
615 Dart_PropagateError(result); 615 Dart_PropagateError(result);
616 } 616 }
617 } 617 }
618 618
619 619
620 // Callback function that gets called from dartutils when there are 620 // Callback function that gets called from dartutils when there are
621 // no more outstanding load requests. 621 // no more outstanding load requests.
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 new CObjectString(CObject::NewString(os_error->message())); 1293 new CObjectString(CObject::NewString(os_error->message()));
1294 CObjectArray* result = new CObjectArray(CObject::NewArray(3)); 1294 CObjectArray* result = new CObjectArray(CObject::NewArray(3));
1295 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError))); 1295 result->SetAt(0, new CObjectInt32(CObject::NewInt32(kOSError)));
1296 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code()))); 1296 result->SetAt(1, new CObjectInt32(CObject::NewInt32(os_error->code())));
1297 result->SetAt(2, error_message); 1297 result->SetAt(2, error_message);
1298 return result; 1298 return result;
1299 } 1299 }
1300 1300
1301 } // namespace bin 1301 } // namespace bin
1302 } // namespace dart 1302 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698