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

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

Issue 1462953002: VM: Make more globals constant where easily possible. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unnecessary const_cast Created 5 years, 1 month 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 | « runtime/bin/dartutils.cc ('k') | runtime/vm/flags.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/vmservice_impl.h" 5 #include "bin/vmservice_impl.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 13 matching lines...) Expand all
24 24
25 #define SHUTDOWN_ON_ERROR(handle) \ 25 #define SHUTDOWN_ON_ERROR(handle) \
26 if (Dart_IsError(handle)) { \ 26 if (Dart_IsError(handle)) { \
27 error_msg_ = strdup(Dart_GetError(handle)); \ 27 error_msg_ = strdup(Dart_GetError(handle)); \
28 Dart_ExitScope(); \ 28 Dart_ExitScope(); \
29 Dart_ShutdownIsolate(); \ 29 Dart_ShutdownIsolate(); \
30 return false; \ 30 return false; \
31 } 31 }
32 32
33 #define kLibrarySourceNamePrefix "/vmservice" 33 #define kLibrarySourceNamePrefix "/vmservice"
34 static const char* kVMServiceIOLibraryUri = "dart:vmservice_io"; 34 static const char* const kVMServiceIOLibraryUri = "dart:vmservice_io";
35 static const char* kVMServiceIOLibraryScriptResourceName = "vmservice_io.dart"; 35 static const char* const kVMServiceIOLibraryScriptResourceName =
36 "vmservice_io.dart";
36 37
37 struct ResourcesEntry { 38 struct ResourcesEntry {
38 const char* path_; 39 const char* path_;
39 const char* resource_; 40 const char* resource_;
40 int length_; 41 int length_;
41 }; 42 };
42 43
43 extern ResourcesEntry __service_bin_resources_[]; 44 extern ResourcesEntry __service_bin_resources_[];
44 45
45 class Resources { 46 class Resources {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 Dart_Handle source = GetSource(url_string); 416 Dart_Handle source = GetSource(url_string);
416 if (Dart_IsError(source)) { 417 if (Dart_IsError(source)) {
417 return source; 418 return source;
418 } 419 }
419 return Dart_LoadSource(library, url, source, 0, 0); 420 return Dart_LoadSource(library, url, source, 0, 0);
420 } 421 }
421 422
422 423
423 } // namespace bin 424 } // namespace bin
424 } // namespace dart 425 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698