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

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

Issue 335027: Reverted 3130-3131 since they don't work on mac. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 // Compile and run the supplied source and return the requested function. 172 // Compile and run the supplied source and return the requested function.
173 static v8::Local<v8::Function> CompileFunction(const char* source, 173 static v8::Local<v8::Function> CompileFunction(const char* source,
174 const char* function_name) { 174 const char* function_name) {
175 v8::Script::Compile(v8::String::New(source))->Run(); 175 v8::Script::Compile(v8::String::New(source))->Run();
176 return v8::Local<v8::Function>::Cast( 176 return v8::Local<v8::Function>::Cast(
177 v8::Context::GetCurrent()->Global()->Get(v8::String::New(function_name))); 177 v8::Context::GetCurrent()->Global()->Get(v8::String::New(function_name)));
178 } 178 }
179 179
180 180
181 // Helper function that compiles and runs the source.
182 static v8::Local<v8::Value> CompileRun(const char* source) {
183 return v8::Script::Compile(v8::String::New(source))->Run();
184 }
185
186
181 // Is there any debug info for the function? 187 // Is there any debug info for the function?
182 static bool HasDebugInfo(v8::Handle<v8::Function> fun) { 188 static bool HasDebugInfo(v8::Handle<v8::Function> fun) {
183 Handle<v8::internal::JSFunction> f = v8::Utils::OpenHandle(*fun); 189 Handle<v8::internal::JSFunction> f = v8::Utils::OpenHandle(*fun);
184 Handle<v8::internal::SharedFunctionInfo> shared(f->shared()); 190 Handle<v8::internal::SharedFunctionInfo> shared(f->shared());
185 return Debug::HasDebugInfo(shared); 191 return Debug::HasDebugInfo(shared);
186 } 192 }
187 193
188 194
189 // Set a break point in a function and return the associated break point 195 // Set a break point in a function and return the associated break point
190 // number. 196 // number.
(...skipping 5240 matching lines...) Expand 10 before | Expand all | Expand 10 after
5431 v8::Script::New( 5437 v8::Script::New(
5432 v8::String::New( 5438 v8::String::New(
5433 "function runTest(mirror) {" 5439 "function runTest(mirror) {"
5434 " return mirror.isString() && (mirror.length() == 5);" 5440 " return mirror.isString() && (mirror.length() == 5);"
5435 "}" 5441 "}"
5436 "" 5442 ""
5437 "runTest;"))->Run()); 5443 "runTest;"))->Run());
5438 v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj); 5444 v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj);
5439 CHECK(result->IsTrue()); 5445 CHECK(result->IsTrue());
5440 } 5446 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-log-stack-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698