| OLD | NEW | 
|---|
| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 90   Isolate* isolate = Isolate::Current(); | 90   Isolate* isolate = Isolate::Current(); | 
| 91   return isolate->stub_cache()->ComputeCallDebugPrepareStepIn(argc, kind); | 91   return isolate->stub_cache()->ComputeCallDebugPrepareStepIn(argc, kind); | 
| 92 } | 92 } | 
| 93 | 93 | 
| 94 | 94 | 
| 95 static v8::Handle<v8::Context> GetDebugEventContext(Isolate* isolate) { | 95 static v8::Handle<v8::Context> GetDebugEventContext(Isolate* isolate) { | 
| 96   Handle<Context> context = isolate->debug()->debugger_entry()->GetContext(); | 96   Handle<Context> context = isolate->debug()->debugger_entry()->GetContext(); | 
| 97   // Isolate::context() may have been NULL when "script collected" event | 97   // Isolate::context() may have been NULL when "script collected" event | 
| 98   // occured. | 98   // occured. | 
| 99   if (context.is_null()) return v8::Local<v8::Context>(); | 99   if (context.is_null()) return v8::Local<v8::Context>(); | 
| 100   Handle<Context> global_context(context->global_context()); | 100   Handle<Context> native_context(context->native_context()); | 
| 101   return v8::Utils::ToLocal(global_context); | 101   return v8::Utils::ToLocal(native_context); | 
| 102 } | 102 } | 
| 103 | 103 | 
| 104 | 104 | 
| 105 BreakLocationIterator::BreakLocationIterator(Handle<DebugInfo> debug_info, | 105 BreakLocationIterator::BreakLocationIterator(Handle<DebugInfo> debug_info, | 
| 106                                              BreakLocatorType type) { | 106                                              BreakLocatorType type) { | 
| 107   debug_info_ = debug_info; | 107   debug_info_ = debug_info; | 
| 108   type_ = type; | 108   type_ = type; | 
| 109   reloc_iterator_ = NULL; | 109   reloc_iterator_ = NULL; | 
| 110   reloc_iterator_original_ = NULL; | 110   reloc_iterator_original_ = NULL; | 
| 111   Reset();  // Initialize the rest of the member variables. | 111   Reset();  // Initialize the rest of the member variables. | 
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 755                                     NATIVES_CODE); | 755                                     NATIVES_CODE); | 
| 756 | 756 | 
| 757   // Silently ignore stack overflows during compilation. | 757   // Silently ignore stack overflows during compilation. | 
| 758   if (function_info.is_null()) { | 758   if (function_info.is_null()) { | 
| 759     ASSERT(isolate->has_pending_exception()); | 759     ASSERT(isolate->has_pending_exception()); | 
| 760     isolate->clear_pending_exception(); | 760     isolate->clear_pending_exception(); | 
| 761     return false; | 761     return false; | 
| 762   } | 762   } | 
| 763 | 763 | 
| 764   // Execute the shared function in the debugger context. | 764   // Execute the shared function in the debugger context. | 
| 765   Handle<Context> context = isolate->global_context(); | 765   Handle<Context> context = isolate->native_context(); | 
| 766   bool caught_exception; | 766   bool caught_exception; | 
| 767   Handle<JSFunction> function = | 767   Handle<JSFunction> function = | 
| 768       factory->NewFunctionFromSharedFunctionInfo(function_info, context); | 768       factory->NewFunctionFromSharedFunctionInfo(function_info, context); | 
| 769 | 769 | 
| 770   Handle<Object> exception = | 770   Handle<Object> exception = | 
| 771       Execution::TryCall(function, Handle<Object>(context->global()), | 771       Execution::TryCall(function, Handle<Object>(context->global()), | 
| 772                          0, NULL, &caught_exception); | 772                          0, NULL, &caught_exception); | 
| 773 | 773 | 
| 774   // Check for caught exceptions. | 774   // Check for caught exceptions. | 
| 775   if (caught_exception) { | 775   if (caught_exception) { | 
| (...skipping 2877 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3653     { | 3653     { | 
| 3654       Locker locker; | 3654       Locker locker; | 
| 3655       Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 3655       Isolate::Current()->debugger()->CallMessageDispatchHandler(); | 
| 3656     } | 3656     } | 
| 3657   } | 3657   } | 
| 3658 } | 3658 } | 
| 3659 | 3659 | 
| 3660 #endif  // ENABLE_DEBUGGER_SUPPORT | 3660 #endif  // ENABLE_DEBUGGER_SUPPORT | 
| 3661 | 3661 | 
| 3662 } }  // namespace v8::internal | 3662 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|