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

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

Issue 10878047: Revert to code state of 3.13.1 plus r12350 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 3 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-compiler.cc ('k') | test/cctest/test-heap.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 7376 matching lines...) Expand 10 before | Expand all | Expand 10 after
7387 7387
7388 // The second script uses forEach. 7388 // The second script uses forEach.
7389 const char* script_2 = "[0].forEach(function() { });"; 7389 const char* script_2 = "[0].forEach(function() { });";
7390 CompileRun(script_2); 7390 CompileRun(script_2);
7391 7391
7392 v8::Debug::SetDebugEventListener(NULL); 7392 v8::Debug::SetDebugEventListener(NULL);
7393 } 7393 }
7394 7394
7395 7395
7396 // Import from test-heap.cc 7396 // Import from test-heap.cc
7397 int CountNativeContexts(); 7397 int CountGlobalContexts();
7398 7398
7399 7399
7400 static void NopListener(v8::DebugEvent event, 7400 static void NopListener(v8::DebugEvent event,
7401 v8::Handle<v8::Object> exec_state, 7401 v8::Handle<v8::Object> exec_state,
7402 v8::Handle<v8::Object> event_data, 7402 v8::Handle<v8::Object> event_data,
7403 v8::Handle<v8::Value> data) { 7403 v8::Handle<v8::Value> data) {
7404 } 7404 }
7405 7405
7406 7406
7407 TEST(DebuggerCreatesContextIffActive) { 7407 TEST(DebuggerCreatesContextIffActive) {
7408 v8::HandleScope scope; 7408 v8::HandleScope scope;
7409 DebugLocalContext env; 7409 DebugLocalContext env;
7410 CHECK_EQ(1, CountNativeContexts()); 7410 CHECK_EQ(1, CountGlobalContexts());
7411 7411
7412 v8::Debug::SetDebugEventListener(NULL); 7412 v8::Debug::SetDebugEventListener(NULL);
7413 CompileRun("debugger;"); 7413 CompileRun("debugger;");
7414 CHECK_EQ(1, CountNativeContexts()); 7414 CHECK_EQ(1, CountGlobalContexts());
7415 7415
7416 v8::Debug::SetDebugEventListener(NopListener); 7416 v8::Debug::SetDebugEventListener(NopListener);
7417 CompileRun("debugger;"); 7417 CompileRun("debugger;");
7418 CHECK_EQ(2, CountNativeContexts()); 7418 CHECK_EQ(2, CountGlobalContexts());
7419 7419
7420 v8::Debug::SetDebugEventListener(NULL); 7420 v8::Debug::SetDebugEventListener(NULL);
7421 } 7421 }
7422 7422
7423 #endif // ENABLE_DEBUGGER_SUPPORT 7423 #endif // ENABLE_DEBUGGER_SUPPORT
OLDNEW
« no previous file with comments | « test/cctest/test-compiler.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698