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

Side by Side Diff: src/api.cc

Issue 42643: Debugger message handler can be called from V8 thread (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 8 months 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 | Annotate | Revision Log
« no previous file with comments | « include/v8-debug.h ('k') | src/debug.h » ('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 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 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after
3067 return true; 3067 return true;
3068 } 3068 }
3069 3069
3070 3070
3071 void Debug::DebugBreak() { 3071 void Debug::DebugBreak() {
3072 if (!i::V8::HasBeenSetup()) return; 3072 if (!i::V8::HasBeenSetup()) return;
3073 i::StackGuard::DebugBreak(); 3073 i::StackGuard::DebugBreak();
3074 } 3074 }
3075 3075
3076 3076
3077 void Debug::SetMessageHandler(v8::DebugMessageHandler handler, void* data) { 3077 void Debug::SetMessageHandler(v8::DebugMessageHandler handler, void* data,
3078 bool message_handler_thread) {
3078 EnsureInitialized("v8::Debug::SetMessageHandler"); 3079 EnsureInitialized("v8::Debug::SetMessageHandler");
3079 i::Debugger::SetMessageHandler(handler, data); 3080 i::Debugger::SetMessageHandler(handler, data, message_handler_thread);
3080 } 3081 }
3081 3082
3082 3083
3083 void Debug::SendCommand(const uint16_t* command, int length) { 3084 void Debug::SendCommand(const uint16_t* command, int length) {
3084 if (!i::V8::HasBeenSetup()) return; 3085 if (!i::V8::HasBeenSetup()) return;
3085 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length)); 3086 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length));
3086 } 3087 }
3087 3088
3088 3089
3089 void Debug::SetHostDispatchHandler(v8::DebugHostDispatchHandler handler, 3090 void Debug::SetHostDispatchHandler(v8::DebugHostDispatchHandler handler,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
3198 reinterpret_cast<HandleScopeImplementer*>(storage); 3199 reinterpret_cast<HandleScopeImplementer*>(storage);
3199 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); 3200 List<void**>* blocks_of_archived_thread = thread_local->Blocks();
3200 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = 3201 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3201 &thread_local->handle_scope_data_; 3202 &thread_local->handle_scope_data_;
3202 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); 3203 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3203 3204
3204 return storage + ArchiveSpacePerThread(); 3205 return storage + ArchiveSpacePerThread();
3205 } 3206 }
3206 3207
3207 } } // namespace v8::internal 3208 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-debug.h ('k') | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698