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

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

Issue 2964133002: Exclude Observatory assets from PRODUCT build dart, dart_precompiled_runtime (Closed)
Patch Set: Addressed comments Created 3 years, 5 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 | « runtime/bin/BUILD.gn ('k') | runtime/runtime_args.gni » ('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 23 matching lines...) Expand all
34 static const char* const kVMServiceIOLibraryUri = "dart:vmservice_io"; 34 static const char* const kVMServiceIOLibraryUri = "dart:vmservice_io";
35 static const char* const kVMServiceIOLibraryScriptResourceName = 35 static const char* const kVMServiceIOLibraryScriptResourceName =
36 "vmservice_io.dart"; 36 "vmservice_io.dart";
37 37
38 struct ResourcesEntry { 38 struct ResourcesEntry {
39 const char* path_; 39 const char* path_;
40 const char* resource_; 40 const char* resource_;
41 int length_; 41 int length_;
42 }; 42 };
43 43
44 #if defined(DART_PRECOMPILED_RUNTIME)
45 ResourcesEntry __service_bin_resources_[] = {{NULL, NULL, 0}};
46 #else
44 extern ResourcesEntry __service_bin_resources_[]; 47 extern ResourcesEntry __service_bin_resources_[];
48 #endif
45 49
46 class Resources { 50 class Resources {
47 public: 51 public:
48 static const int kNoSuchInstance = -1; 52 static const int kNoSuchInstance = -1;
49 static int ResourceLookup(const char* path, const char** resource) { 53 static int ResourceLookup(const char* path, const char** resource) {
50 ResourcesEntry* table = ResourcesTable(); 54 ResourcesEntry* table = ResourcesTable();
51 for (int i = 0; table[i].path_ != NULL; i++) { 55 for (int i = 0; table[i].path_ != NULL; i++) {
52 const ResourcesEntry& entry = table[i]; 56 const ResourcesEntry& entry = table[i];
53 if (strcmp(path, entry.path_) == 0) { 57 if (strcmp(path, entry.path_) == 0) {
54 *resource = entry.resource_; 58 *resource = entry.resource_;
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 Dart_Handle source = GetSource(url_string); 382 Dart_Handle source = GetSource(url_string);
379 if (Dart_IsError(source)) { 383 if (Dart_IsError(source)) {
380 return source; 384 return source;
381 } 385 }
382 return Dart_LoadSource(library, url, Dart_Null(), source, 0, 0); 386 return Dart_LoadSource(library, url, Dart_Null(), source, 0, 0);
383 } 387 }
384 388
385 389
386 } // namespace bin 390 } // namespace bin
387 } // namespace dart 391 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/runtime_args.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698