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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 return Debug::HasDebugInfo(shared); | 187 return Debug::HasDebugInfo(shared); |
188 } | 188 } |
189 | 189 |
190 | 190 |
191 // Set a break point in a function and return the associated break point | 191 // Set a break point in a function and return the associated break point |
192 // number. | 192 // number. |
193 static int SetBreakPoint(Handle<v8::internal::JSFunction> fun, int position) { | 193 static int SetBreakPoint(Handle<v8::internal::JSFunction> fun, int position) { |
194 static int break_point = 0; | 194 static int break_point = 0; |
195 Handle<v8::internal::SharedFunctionInfo> shared(fun->shared()); | 195 Handle<v8::internal::SharedFunctionInfo> shared(fun->shared()); |
196 Debug::SetBreakPoint( | 196 Debug::SetBreakPoint( |
197 shared, position, | 197 shared, |
198 Handle<Object>(v8::internal::Smi::FromInt(++break_point))); | 198 Handle<Object>(v8::internal::Smi::FromInt(++break_point)), |
| 199 &position); |
199 return break_point; | 200 return break_point; |
200 } | 201 } |
201 | 202 |
202 | 203 |
203 // Set a break point in a function and return the associated break point | 204 // Set a break point in a function and return the associated break point |
204 // number. | 205 // number. |
205 static int SetBreakPoint(v8::Handle<v8::Function> fun, int position) { | 206 static int SetBreakPoint(v8::Handle<v8::Function> fun, int position) { |
206 return SetBreakPoint(v8::Utils::OpenHandle(*fun), position); | 207 return SetBreakPoint(v8::Utils::OpenHandle(*fun), position); |
207 } | 208 } |
208 | 209 |
(...skipping 6355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6564 expected_context = v8::Context::New(); | 6565 expected_context = v8::Context::New(); |
6565 v8::Context::Scope context_scope(expected_context); | 6566 v8::Context::Scope context_scope(expected_context); |
6566 v8::Script::Compile(v8::String::New("(function(){debugger;})();"))->Run(); | 6567 v8::Script::Compile(v8::String::New("(function(){debugger;})();"))->Run(); |
6567 expected_context.Dispose(); | 6568 expected_context.Dispose(); |
6568 expected_context.Clear(); | 6569 expected_context.Clear(); |
6569 v8::Debug::SetDebugEventListener(NULL); | 6570 v8::Debug::SetDebugEventListener(NULL); |
6570 expected_context_data = v8::Handle<v8::Value>(); | 6571 expected_context_data = v8::Handle<v8::Value>(); |
6571 CheckDebuggerUnloaded(); | 6572 CheckDebuggerUnloaded(); |
6572 } | 6573 } |
6573 | 6574 |
OLD | NEW |