| Index: runtime/bin/vmservice_impl.cc
|
| diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
|
| index 99e8148065a153e0dd889e632f04a3b76568ceec..18f06c1c3c02f446abe6527511e188de646bad62 100644
|
| --- a/runtime/bin/vmservice_impl.cc
|
| +++ b/runtime/bin/vmservice_impl.cc
|
| @@ -31,7 +31,6 @@ namespace bin {
|
|
|
| #define kLibrarySourceNamePrefix "/vmservice"
|
| static const char* kVMServiceIOLibraryScriptResourceName = "vmservice_io.dart";
|
| -#define kClientResourceNamePrefix "/vmservice/observatory/deployed/web"
|
|
|
| struct ResourcesEntry {
|
| const char* path_;
|
| @@ -246,17 +245,15 @@ Dart_Handle VmService::LoadSource(Dart_Handle library, const char* name) {
|
|
|
|
|
| Dart_Handle VmService::LoadResource(Dart_Handle library,
|
| - const char* resource_name,
|
| - const char* prefix) {
|
| - intptr_t prefix_len = strlen(prefix);
|
| + const char* resource_name) {
|
| // Prepare for invoke call.
|
| - Dart_Handle name = Dart_NewStringFromCString(resource_name+prefix_len);
|
| + Dart_Handle name = Dart_NewStringFromCString(resource_name);
|
| RETURN_ERROR_HANDLE(name);
|
| const char* data_buffer = NULL;
|
| int data_buffer_length = Resources::ResourceLookup(resource_name,
|
| &data_buffer);
|
| if (data_buffer_length == Resources::kNoSuchInstance) {
|
| - printf("Could not find %s %s\n", resource_name, resource_name+prefix_len);
|
| + printf("Could not find %s %s\n", resource_name, resource_name);
|
| }
|
| ASSERT(data_buffer_length != Resources::kNoSuchInstance);
|
| Dart_Handle data_list = Dart_NewTypedData(Dart_TypedData_kUint8,
|
| @@ -287,11 +284,13 @@ Dart_Handle VmService::LoadResource(Dart_Handle library,
|
|
|
| Dart_Handle VmService::LoadResources(Dart_Handle library) {
|
| Dart_Handle result = Dart_Null();
|
| - intptr_t prefixLen = strlen(kClientResourceNamePrefix);
|
| + intptr_t prefixLen = strlen(kLibrarySourceNamePrefix);
|
| for (intptr_t i = 0; Resources::Path(i) != NULL; i++) {
|
| const char* path = Resources::Path(i);
|
| - if (!strncmp(path, kClientResourceNamePrefix, prefixLen)) {
|
| - result = LoadResource(library, path, kClientResourceNamePrefix);
|
| + // If it doesn't begin with kLibrarySourceNamePrefix it is a frontend
|
| + // resource.
|
| + if (strncmp(path, kLibrarySourceNamePrefix, prefixLen) != 0) {
|
| + result = LoadResource(library, path);
|
| if (Dart_IsError(result)) {
|
| break;
|
| }
|
|
|