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

Side by Side Diff: test/cctest/test-debug.cc

Issue 545118: Re-Fix DebugEvaluateWithoutStack test on Windows (Closed)
Patch Set: Created 10 years, 11 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 } 2195 }
2196 2196
2197 2197
2198 // We match parts of the message to get evaluate result int value. 2198 // We match parts of the message to get evaluate result int value.
2199 bool GetEvaluateStringResult(char *message, char* buffer, int buffer_size) { 2199 bool GetEvaluateStringResult(char *message, char* buffer, int buffer_size) {
2200 const char* value = "\"value\":"; 2200 const char* value = "\"value\":";
2201 char* pos = strstr(message, value); 2201 char* pos = strstr(message, value);
2202 if (pos == NULL) { 2202 if (pos == NULL) {
2203 return false; 2203 return false;
2204 } 2204 }
2205 Vector<char> buf(buffer, buffer_size - 1); 2205 Vector<char> buf(buffer, buffer_size);
2206 OS::StrNCpy(buf, pos, buffer_size); 2206 OS::StrNCpy(buf, pos, buffer_size - 1);
2207 buffer[buffer_size - 1] = '\0';
2207 return true; 2208 return true;
2208 } 2209 }
2209 2210
2210 2211
2211 struct EvaluateResult { 2212 struct EvaluateResult {
2212 static const int kBufferSize = 20; 2213 static const int kBufferSize = 20;
2213 char buffer[kBufferSize]; 2214 char buffer[kBufferSize];
2214 }; 2215 };
2215 2216
2216 struct DebugProcessDebugMessagesData { 2217 struct DebugProcessDebugMessagesData {
(...skipping 3733 matching lines...) Expand 10 before | Expand all | Expand 10 after
5950 5951
5951 break_point_hit_count = 0; 5952 break_point_hit_count = 0;
5952 foo->Call(env->Global(), 0, NULL); 5953 foo->Call(env->Global(), 0, NULL);
5953 CHECK_EQ(1, break_point_hit_count); 5954 CHECK_EQ(1, break_point_hit_count);
5954 5955
5955 v8::Debug::SetDebugEventListener(NULL); 5956 v8::Debug::SetDebugEventListener(NULL);
5956 debugee_context = v8::Handle<v8::Context>(); 5957 debugee_context = v8::Handle<v8::Context>();
5957 debugger_context = v8::Handle<v8::Context>(); 5958 debugger_context = v8::Handle<v8::Context>();
5958 CheckDebuggerUnloaded(); 5959 CheckDebuggerUnloaded();
5959 } 5960 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698