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

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

Issue 1431473003: Mark GetCallingContext as soon-to-be deprecated (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « test/cctest/test-api.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 6789 matching lines...) Expand 10 before | Expand all | Expand 10 after
6800 6800
6801 // Property getter that checks that current and calling contexts 6801 // Property getter that checks that current and calling contexts
6802 // are both the debugee contexts. 6802 // are both the debugee contexts.
6803 static void NamedGetterWithCallingContextCheck( 6803 static void NamedGetterWithCallingContextCheck(
6804 v8::Local<v8::String> name, 6804 v8::Local<v8::String> name,
6805 const v8::PropertyCallbackInfo<v8::Value>& info) { 6805 const v8::PropertyCallbackInfo<v8::Value>& info) {
6806 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(name), "a")); 6806 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(name), "a"));
6807 v8::Handle<v8::Context> current = info.GetIsolate()->GetCurrentContext(); 6807 v8::Handle<v8::Context> current = info.GetIsolate()->GetCurrentContext();
6808 CHECK(current == debugee_context); 6808 CHECK(current == debugee_context);
6809 CHECK(current != debugger_context); 6809 CHECK(current != debugger_context);
6810 v8::Handle<v8::Context> calling = info.GetIsolate()->GetCallingContext();
6811 CHECK(calling == debugee_context);
6812 CHECK(calling != debugger_context);
6813 info.GetReturnValue().Set(1); 6810 info.GetReturnValue().Set(1);
6814 } 6811 }
6815 6812
6816 6813
6817 // Debug event listener that checks if the first argument of a function is 6814 // Debug event listener that checks if the first argument of a function is
6818 // an object with property 'a' == 1. If the property has custom accessor 6815 // an object with property 'a' == 1. If the property has custom accessor
6819 // this handler will eventually invoke it. 6816 // this handler will eventually invoke it.
6820 static void DebugEventGetAtgumentPropertyValue( 6817 static void DebugEventGetAtgumentPropertyValue(
6821 const v8::Debug::EventDetails& event_details) { 6818 const v8::Debug::EventDetails& event_details) {
6822 v8::DebugEvent event = event_details.GetEvent(); 6819 v8::DebugEvent event = event_details.GetEvent();
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
7646 CompileRun("function foo() {}; foo();"); 7643 CompileRun("function foo() {}; foo();");
7647 --after_compile_handler_depth; 7644 --after_compile_handler_depth;
7648 } 7645 }
7649 7646
7650 7647
7651 TEST(NoInterruptsInDebugListener) { 7648 TEST(NoInterruptsInDebugListener) {
7652 DebugLocalContext env; 7649 DebugLocalContext env;
7653 v8::Debug::SetDebugEventListener(NoInterruptsOnDebugEvent); 7650 v8::Debug::SetDebugEventListener(NoInterruptsOnDebugEvent);
7654 CompileRun("void(0);"); 7651 CompileRun("void(0);");
7655 } 7652 }
OLDNEW
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698