OLD | NEW |
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 5598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5609 | 5609 |
5610 v8::Handle<v8::Context> debugee_context; | 5610 v8::Handle<v8::Context> debugee_context; |
5611 v8::Handle<v8::Context> debugger_context; | 5611 v8::Handle<v8::Context> debugger_context; |
5612 | 5612 |
5613 | 5613 |
5614 // Property getter that checks that current and calling contexts | 5614 // Property getter that checks that current and calling contexts |
5615 // are both the debugee contexts. | 5615 // are both the debugee contexts. |
5616 static v8::Handle<v8::Value> NamedGetterWithCallingContextCheck( | 5616 static v8::Handle<v8::Value> NamedGetterWithCallingContextCheck( |
5617 v8::Local<v8::String> name, | 5617 v8::Local<v8::String> name, |
5618 const v8::AccessorInfo& info) { | 5618 const v8::AccessorInfo& info) { |
5619 CHECK(strcmp(*v8::String::AsciiValue(name), "a") == 0); | 5619 CHECK_EQ(0, strcmp(*v8::String::AsciiValue(name), "a")); |
5620 v8::Handle<v8::Context> current = v8::Context::GetCurrent(); | 5620 v8::Handle<v8::Context> current = v8::Context::GetCurrent(); |
5621 CHECK(current == debugee_context); | 5621 CHECK(current == debugee_context); |
5622 CHECK(current != debugger_context); | 5622 CHECK(current != debugger_context); |
5623 v8::Handle<v8::Context> calling = v8::Context::GetCalling(); | 5623 v8::Handle<v8::Context> calling = v8::Context::GetCalling(); |
5624 CHECK(calling == debugee_context); | 5624 CHECK(calling == debugee_context); |
5625 CHECK(calling != debugger_context); | 5625 CHECK(calling != debugger_context); |
5626 return v8::Int32::New(1); | 5626 return v8::Int32::New(1); |
5627 } | 5627 } |
5628 | 5628 |
5629 | 5629 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5681 | 5681 |
5682 break_point_hit_count = 0; | 5682 break_point_hit_count = 0; |
5683 foo->Call(env->Global(), 0, NULL); | 5683 foo->Call(env->Global(), 0, NULL); |
5684 CHECK_EQ(1, break_point_hit_count); | 5684 CHECK_EQ(1, break_point_hit_count); |
5685 | 5685 |
5686 v8::Debug::SetDebugEventListener(NULL); | 5686 v8::Debug::SetDebugEventListener(NULL); |
5687 debugee_context = v8::Handle<v8::Context>(); | 5687 debugee_context = v8::Handle<v8::Context>(); |
5688 debugger_context = v8::Handle<v8::Context>(); | 5688 debugger_context = v8::Handle<v8::Context>(); |
5689 CheckDebuggerUnloaded(); | 5689 CheckDebuggerUnloaded(); |
5690 } | 5690 } |
OLD | NEW |