| OLD | NEW | 
|    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 "platform/globals.h" |    5 #include "platform/globals.h" | 
|    6  |    6  | 
|    7 #include "include/dart_tools_api.h" |    7 #include "include/dart_tools_api.h" | 
|    8 #include "vm/dart_api_impl.h" |    8 #include "vm/dart_api_impl.h" | 
|    9 #include "vm/dart_entry.h" |    9 #include "vm/dart_entry.h" | 
|   10 #include "vm/debugger.h" |   10 #include "vm/debugger.h" | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|   39     MessageSnapshotReader reader(message->data(), message->len(), thread); |   39     MessageSnapshotReader reader(message->data(), message->len(), thread); | 
|   40     const Object& response_obj = Object::Handle(reader.ReadObject()); |   40     const Object& response_obj = Object::Handle(reader.ReadObject()); | 
|   41     String& response = String::Handle(); |   41     String& response = String::Handle(); | 
|   42     response ^= response_obj.raw(); |   42     response ^= response_obj.raw(); | 
|   43     _msg = strdup(response.ToCString()); |   43     _msg = strdup(response.ToCString()); | 
|   44     return kOK; |   44     return kOK; | 
|   45   } |   45   } | 
|   46  |   46  | 
|   47   const char* msg() const { return _msg; } |   47   const char* msg() const { return _msg; } | 
|   48  |   48  | 
 |   49   virtual Isolate* isolate() const { return Isolate::Current(); } | 
 |   50  | 
|   49  private: |   51  private: | 
|   50   char* _msg; |   52   char* _msg; | 
|   51 }; |   53 }; | 
|   52  |   54  | 
|   53  |   55  | 
|   54 static RawArray* Eval(Dart_Handle lib, const char* expr) { |   56 static RawArray* Eval(Dart_Handle lib, const char* expr) { | 
|   55   const String& dummy_isolate_id = String::Handle(String::New("isolateId")); |   57   const String& dummy_isolate_id = String::Handle(String::New("isolateId")); | 
|   56   Dart_Handle expr_val = Dart_EvaluateExpr(lib, NewString(expr)); |   58   Dart_Handle expr_val = Dart_EvaluateExpr(lib, NewString(expr)); | 
|   57   EXPECT_VALID(expr_val); |   59   EXPECT_VALID(expr_val); | 
|   58   Zone* zone = Thread::Current()->zone(); |   60   Zone* zone = Thread::Current()->zone(); | 
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  627       Eval(lib, "[0, port, '0', '_getCpuProfile', ['tags'], ['Bogus']]"); |  629       Eval(lib, "[0, port, '0', '_getCpuProfile', ['tags'], ['Bogus']]"); | 
|  628   Service::HandleIsolateMessage(isolate, service_msg); |  630   Service::HandleIsolateMessage(isolate, service_msg); | 
|  629   EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); |  631   EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); | 
|  630   // Expect error. |  632   // Expect error. | 
|  631   EXPECT_SUBSTRING("\"error\"", handler.msg()); |  633   EXPECT_SUBSTRING("\"error\"", handler.msg()); | 
|  632 } |  634 } | 
|  633  |  635  | 
|  634 #endif  // !defined(TARGET_ARCH_ARM64) |  636 #endif  // !defined(TARGET_ARCH_ARM64) | 
|  635  |  637  | 
|  636 }  // namespace dart |  638 }  // namespace dart | 
| OLD | NEW |