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

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

Issue 96773002: Handle captured objects in OptimizedFrame::Summarize. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « src/isolate.cc ('k') | test/mjsunit/regress/regress-3029.js » ('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 3925 matching lines...) Expand 10 before | Expand all | Expand 10 after
3936 // of debug event exception callbacks and message callbacks are collected. The 3936 // of debug event exception callbacks and message callbacks are collected. The
3937 // number of debug event exception callbacks are used to check that the 3937 // number of debug event exception callbacks are used to check that the
3938 // debugger is called correctly and the number of message callbacks is used to 3938 // debugger is called correctly and the number of message callbacks is used to
3939 // check that uncaught exceptions are still returned even if there is a break 3939 // check that uncaught exceptions are still returned even if there is a break
3940 // for them. 3940 // for them.
3941 TEST(BreakOnException) { 3941 TEST(BreakOnException) {
3942 DebugLocalContext env; 3942 DebugLocalContext env;
3943 v8::HandleScope scope(env->GetIsolate()); 3943 v8::HandleScope scope(env->GetIsolate());
3944 env.ExposeDebug(); 3944 env.ExposeDebug();
3945 3945
3946 CcTest::i_isolate()->TraceException(false);
3947
3948 // Create functions for testing break on exception. 3946 // Create functions for testing break on exception.
3949 CompileFunction(&env, "function throws(){throw 1;}", "throws"); 3947 CompileFunction(&env, "function throws(){throw 1;}", "throws");
3950 v8::Local<v8::Function> caught = 3948 v8::Local<v8::Function> caught =
3951 CompileFunction(&env, 3949 CompileFunction(&env,
3952 "function caught(){try {throws();} catch(e) {};}", 3950 "function caught(){try {throws();} catch(e) {};}",
3953 "caught"); 3951 "caught");
3954 v8::Local<v8::Function> notCaught = 3952 v8::Local<v8::Function> notCaught =
3955 CompileFunction(&env, "function notCaught(){throws();}", "notCaught"); 3953 CompileFunction(&env, "function notCaught(){throws();}", "notCaught");
3956 3954
3957 v8::V8::AddMessageListener(MessageCallbackCount); 3955 v8::V8::AddMessageListener(MessageCallbackCount);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
4082 // Test break on exception from compiler errors. When compiling using 4080 // Test break on exception from compiler errors. When compiling using
4083 // v8::Script::Compile there is no JavaScript stack whereas when compiling using 4081 // v8::Script::Compile there is no JavaScript stack whereas when compiling using
4084 // eval there are JavaScript frames. 4082 // eval there are JavaScript frames.
4085 TEST(BreakOnCompileException) { 4083 TEST(BreakOnCompileException) {
4086 DebugLocalContext env; 4084 DebugLocalContext env;
4087 v8::HandleScope scope(env->GetIsolate()); 4085 v8::HandleScope scope(env->GetIsolate());
4088 4086
4089 // For this test, we want to break on uncaught exceptions: 4087 // For this test, we want to break on uncaught exceptions:
4090 ChangeBreakOnException(false, true); 4088 ChangeBreakOnException(false, true);
4091 4089
4092 CcTest::i_isolate()->TraceException(false);
4093
4094 // Create a function for checking the function when hitting a break point. 4090 // Create a function for checking the function when hitting a break point.
4095 frame_count = CompileFunction(&env, frame_count_source, "frame_count"); 4091 frame_count = CompileFunction(&env, frame_count_source, "frame_count");
4096 4092
4097 v8::V8::AddMessageListener(MessageCallbackCount); 4093 v8::V8::AddMessageListener(MessageCallbackCount);
4098 v8::Debug::SetDebugEventListener2(DebugEventCounter); 4094 v8::Debug::SetDebugEventListener2(DebugEventCounter);
4099 4095
4100 DebugEventCounterClear(); 4096 DebugEventCounterClear();
4101 MessageCallbackCountClear(); 4097 MessageCallbackCountClear();
4102 4098
4103 // Check initial state. 4099 // Check initial state.
(...skipping 3627 matching lines...) Expand 10 before | Expand all | Expand 10 after
7731 TEST(LiveEditDisabled) { 7727 TEST(LiveEditDisabled) {
7732 v8::internal::FLAG_allow_natives_syntax = true; 7728 v8::internal::FLAG_allow_natives_syntax = true;
7733 LocalContext env; 7729 LocalContext env;
7734 v8::HandleScope scope(env->GetIsolate()); 7730 v8::HandleScope scope(env->GetIsolate());
7735 v8::Debug::SetLiveEditEnabled(false), env->GetIsolate(); 7731 v8::Debug::SetLiveEditEnabled(false), env->GetIsolate();
7736 CompileRun("%LiveEditCompareStrings('', '')"); 7732 CompileRun("%LiveEditCompareStrings('', '')");
7737 } 7733 }
7738 7734
7739 7735
7740 #endif // ENABLE_DEBUGGER_SUPPORT 7736 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | test/mjsunit/regress/regress-3029.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698