| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 JSONStream js; | 161 JSONStream js; |
| 162 isolate->PrintJSON(&js, false); | 162 isolate->PrintJSON(&js, false); |
| 163 // No error property and no PauseExit state. | 163 // No error property and no PauseExit state. |
| 164 EXPECT_NOTSUBSTRING("\"error\":", js.ToCString()); | 164 EXPECT_NOTSUBSTRING("\"error\":", js.ToCString()); |
| 165 EXPECT_NOTSUBSTRING("HI THERE STICKY", js.ToCString()); | 165 EXPECT_NOTSUBSTRING("HI THERE STICKY", js.ToCString()); |
| 166 EXPECT_NOTSUBSTRING("PauseExit", js.ToCString()); | 166 EXPECT_NOTSUBSTRING("PauseExit", js.ToCString()); |
| 167 } | 167 } |
| 168 | 168 |
| 169 // Set the sticky error. | 169 // Set the sticky error. |
| 170 Dart_SetStickyError(result); | 170 Dart_SetStickyError(result); |
| 171 Dart_SetPausedOnExit(true); |
| 171 EXPECT(Dart_HasStickyError()); | 172 EXPECT(Dart_HasStickyError()); |
| 172 | 173 |
| 173 { | 174 { |
| 174 TransitionNativeToVM transition(thread); | 175 TransitionNativeToVM transition(thread); |
| 175 | 176 |
| 176 JSONStream js; | 177 JSONStream js; |
| 177 isolate->PrintJSON(&js, false); | 178 isolate->PrintJSON(&js, false); |
| 178 // Error and PauseExit set. | 179 // Error and PauseExit set. |
| 179 EXPECT_SUBSTRING("\"error\":", js.ToCString()); | 180 EXPECT_SUBSTRING("\"error\":", js.ToCString()); |
| 180 EXPECT_SUBSTRING("HI THERE STICKY", js.ToCString()); | 181 EXPECT_SUBSTRING("HI THERE STICKY", js.ToCString()); |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); | 790 EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); |
| 790 // Expect error. | 791 // Expect error. |
| 791 EXPECT_SUBSTRING("\"error\"", handler.msg()); | 792 EXPECT_SUBSTRING("\"error\"", handler.msg()); |
| 792 } | 793 } |
| 793 | 794 |
| 794 #endif // !defined(TARGET_ARCH_ARM64) | 795 #endif // !defined(TARGET_ARCH_ARM64) |
| 795 | 796 |
| 796 #endif // !PRODUCT | 797 #endif // !PRODUCT |
| 797 | 798 |
| 798 } // namespace dart | 799 } // namespace dart |
| OLD | NEW |