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

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

Issue 315003003: Compilation API: next step of deprecations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-profile-generator.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 v8::ScriptOrigin origin = 1631 v8::ScriptOrigin origin =
1632 v8::ScriptOrigin(v8::String::NewFromUtf8(env->GetIsolate(), "test")); 1632 v8::ScriptOrigin(v8::String::NewFromUtf8(env->GetIsolate(), "test"));
1633 v8::Local<v8::Script> script = v8::Script::Compile(source, &origin); 1633 v8::Local<v8::Script> script = v8::Script::Compile(source, &origin);
1634 script->Run(); 1634 script->Run();
1635 v8::Local<v8::Function> f = v8::Local<v8::Function>::Cast( 1635 v8::Local<v8::Function> f = v8::Local<v8::Function>::Cast(
1636 env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "f"))); 1636 env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "f")));
1637 v8::Local<v8::Function> g = v8::Local<v8::Function>::Cast( 1637 v8::Local<v8::Function> g = v8::Local<v8::Function>::Cast(
1638 env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "g"))); 1638 env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "g")));
1639 1639
1640 // Get the script id knowing that internally it is a 32 integer. 1640 // Get the script id knowing that internally it is a 32 integer.
1641 int script_id = script->GetId(); 1641 int script_id = script->GetUnboundScript()->GetId();
1642 1642
1643 // Call f and g without break points. 1643 // Call f and g without break points.
1644 break_point_hit_count = 0; 1644 break_point_hit_count = 0;
1645 f->Call(env->Global(), 0, NULL); 1645 f->Call(env->Global(), 0, NULL);
1646 CHECK_EQ(0, break_point_hit_count); 1646 CHECK_EQ(0, break_point_hit_count);
1647 g->Call(env->Global(), 0, NULL); 1647 g->Call(env->Global(), 0, NULL);
1648 CHECK_EQ(0, break_point_hit_count); 1648 CHECK_EQ(0, break_point_hit_count);
1649 1649
1650 // Call f and g with break point on line 12. 1650 // Call f and g with break point on line 12.
1651 int sbp1 = SetScriptBreakPointByIdFromJS(env->GetIsolate(), script_id, 12, 0); 1651 int sbp1 = SetScriptBreakPointByIdFromJS(env->GetIsolate(), script_id, 12, 0);
(...skipping 5812 matching lines...) Expand 10 before | Expand all | Expand 10 after
7464 TEST(DebugBreakOffThreadTerminate) { 7464 TEST(DebugBreakOffThreadTerminate) {
7465 DebugLocalContext env; 7465 DebugLocalContext env;
7466 v8::Isolate* isolate = env->GetIsolate(); 7466 v8::Isolate* isolate = env->GetIsolate();
7467 v8::HandleScope scope(isolate); 7467 v8::HandleScope scope(isolate);
7468 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate); 7468 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate);
7469 TerminationThread terminator(isolate); 7469 TerminationThread terminator(isolate);
7470 terminator.Start(); 7470 terminator.Start();
7471 v8::Debug::DebugBreak(isolate); 7471 v8::Debug::DebugBreak(isolate);
7472 CompileRun("while (true);"); 7472 CompileRun("while (true);");
7473 } 7473 }
OLDNEW
« no previous file with comments | « test/cctest/test-cpu-profiler.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698