| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3874 | 3874 |
| 3875 // We match parts of the message to get total frames number. | 3875 // We match parts of the message to get total frames number. |
| 3876 int GetTotalFramesInt(char *message) { | 3876 int GetTotalFramesInt(char *message) { |
| 3877 const char* prefix = "\"totalFrames\":"; | 3877 const char* prefix = "\"totalFrames\":"; |
| 3878 char* pos = strstr(message, prefix); | 3878 char* pos = strstr(message, prefix); |
| 3879 if (pos == NULL) { | 3879 if (pos == NULL) { |
| 3880 return -1; | 3880 return -1; |
| 3881 } | 3881 } |
| 3882 pos += strlen(prefix); | 3882 pos += strlen(prefix); |
| 3883 char* pos_end = pos; | 3883 char* pos_end = pos; |
| 3884 long res = strtol(pos, &pos_end, 10); | 3884 int res = static_cast<int>(strtol(pos, &pos_end, 10)); |
| 3885 if (pos_end == pos) { | 3885 if (pos_end == pos) { |
| 3886 return -1; | 3886 return -1; |
| 3887 } | 3887 } |
| 3888 return static_cast<int>(res); | 3888 return res; |
| 3889 } | 3889 } |
| 3890 | 3890 |
| 3891 | 3891 |
| 3892 /* Test MessageQueues */ | 3892 /* Test MessageQueues */ |
| 3893 /* Tests the message queues that hold debugger commands and | 3893 /* Tests the message queues that hold debugger commands and |
| 3894 * response messages to the debugger. Fills queues and makes | 3894 * response messages to the debugger. Fills queues and makes |
| 3895 * them grow. | 3895 * them grow. |
| 3896 */ | 3896 */ |
| 3897 Barriers message_queue_barriers; | 3897 Barriers message_queue_barriers; |
| 3898 | 3898 |
| (...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6020 | 6020 |
| 6021 break_point_hit_count = 0; | 6021 break_point_hit_count = 0; |
| 6022 foo->Call(env->Global(), 0, NULL); | 6022 foo->Call(env->Global(), 0, NULL); |
| 6023 CHECK_EQ(1, break_point_hit_count); | 6023 CHECK_EQ(1, break_point_hit_count); |
| 6024 | 6024 |
| 6025 v8::Debug::SetDebugEventListener(NULL); | 6025 v8::Debug::SetDebugEventListener(NULL); |
| 6026 debugee_context = v8::Handle<v8::Context>(); | 6026 debugee_context = v8::Handle<v8::Context>(); |
| 6027 debugger_context = v8::Handle<v8::Context>(); | 6027 debugger_context = v8::Handle<v8::Context>(); |
| 6028 CheckDebuggerUnloaded(); | 6028 CheckDebuggerUnloaded(); |
| 6029 } | 6029 } |
| OLD | NEW |