Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 4885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4896 | 4896 |
| 4897 | 4897 |
| 4898 void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { | 4898 void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { |
| 4899 EnsureInitialized("v8::Debug::SetMessageHandler"); | 4899 EnsureInitialized("v8::Debug::SetMessageHandler"); |
| 4900 ENTER_V8; | 4900 ENTER_V8; |
| 4901 i::Isolate::Current()->debugger()->SetMessageHandler(handler); | 4901 i::Isolate::Current()->debugger()->SetMessageHandler(handler); |
| 4902 } | 4902 } |
| 4903 | 4903 |
| 4904 | 4904 |
| 4905 void Debug::SendCommand(const uint16_t* command, int length, | 4905 void Debug::SendCommand(const uint16_t* command, int length, |
| 4906 ClientData* client_data) { | 4906 ClientData* client_data, |
| 4907 if (!i::Isolate::Current()->IsInitialized()) return; | 4907 Isolate* isolate) { |
| 4908 i::Isolate::Current()->debugger()->ProcessCommand( | 4908 // If no isolate is supplied, use the default isolate. |
| 4909 i::Vector<const uint16_t>(command, length), client_data); | 4909 if (isolate != NULL) { |
| 4910 » i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | |
|
Vitaly Repeshko
2011/03/22 15:54:10
Replace tabs with spaces and fix indentation.
| |
| 4911 » internal_isolate->debugger()->ProcessCommand( | |
| 4912 » i::Vector<const uint16_t>(command, length), client_data); | |
| 4913 } else { | |
| 4914 » i::Isolate::GetDefaultIsolateDebugger()->ProcessCommand( | |
| 4915 i::Vector<const uint16_t>(command, length), client_data); | |
| 4916 } | |
| 4910 } | 4917 } |
| 4911 | 4918 |
| 4912 | 4919 |
| 4913 void Debug::SetHostDispatchHandler(HostDispatchHandler handler, | 4920 void Debug::SetHostDispatchHandler(HostDispatchHandler handler, |
| 4914 int period) { | 4921 int period) { |
| 4915 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); | 4922 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); |
| 4916 ENTER_V8; | 4923 ENTER_V8; |
| 4917 i::Isolate::Current()->debugger()->SetHostDispatchHandler(handler, period); | 4924 i::Isolate::Current()->debugger()->SetHostDispatchHandler(handler, period); |
| 4918 } | 4925 } |
| 4919 | 4926 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5608 | 5615 |
| 5609 | 5616 |
| 5610 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 5617 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 5611 HandleScopeImplementer* thread_local = | 5618 HandleScopeImplementer* thread_local = |
| 5612 reinterpret_cast<HandleScopeImplementer*>(storage); | 5619 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 5613 thread_local->IterateThis(v); | 5620 thread_local->IterateThis(v); |
| 5614 return storage + ArchiveSpacePerThread(); | 5621 return storage + ArchiveSpacePerThread(); |
| 5615 } | 5622 } |
| 5616 | 5623 |
| 5617 } } // namespace v8::internal | 5624 } } // namespace v8::internal |
| OLD | NEW |