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

Side by Side Diff: src/debug.cc

Issue 7575013: Merge r8833 "Minimize malloc heap allocation on process startup" to 3.2. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.2/
Patch Set: '' Created 9 years, 4 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 | « src/debug.h ('k') | src/execution.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 1979
1980 1980
1981 void Debug::AfterGarbageCollection() { 1981 void Debug::AfterGarbageCollection() {
1982 // Generate events for collected scripts. 1982 // Generate events for collected scripts.
1983 if (script_cache_ != NULL) { 1983 if (script_cache_ != NULL) {
1984 script_cache_->ProcessCollectedScripts(); 1984 script_cache_->ProcessCollectedScripts();
1985 } 1985 }
1986 } 1986 }
1987 1987
1988 1988
1989 Debugger::Debugger() 1989 Debugger::Debugger(Isolate* isolate)
1990 : debugger_access_(OS::CreateMutex()), 1990 : debugger_access_(isolate->debugger_access()),
1991 event_listener_(Handle<Object>()), 1991 event_listener_(Handle<Object>()),
1992 event_listener_data_(Handle<Object>()), 1992 event_listener_data_(Handle<Object>()),
1993 compiling_natives_(false), 1993 compiling_natives_(false),
1994 is_loading_debugger_(false), 1994 is_loading_debugger_(false),
1995 never_unload_debugger_(false), 1995 never_unload_debugger_(false),
1996 message_handler_(NULL), 1996 message_handler_(NULL),
1997 debugger_unload_pending_(false), 1997 debugger_unload_pending_(false),
1998 host_dispatch_handler_(NULL), 1998 host_dispatch_handler_(NULL),
1999 dispatch_handler_access_(OS::CreateMutex()), 1999 dispatch_handler_access_(OS::CreateMutex()),
2000 debug_message_dispatch_handler_(NULL), 2000 debug_message_dispatch_handler_(NULL),
2001 message_dispatch_helper_thread_(NULL), 2001 message_dispatch_helper_thread_(NULL),
2002 host_dispatch_micros_(100 * 1000), 2002 host_dispatch_micros_(100 * 1000),
2003 agent_(NULL), 2003 agent_(NULL),
2004 command_queue_(kQueueInitialSize), 2004 command_queue_(kQueueInitialSize),
2005 command_received_(OS::CreateSemaphore(0)), 2005 command_received_(OS::CreateSemaphore(0)),
2006 event_command_queue_(kQueueInitialSize) { 2006 event_command_queue_(kQueueInitialSize),
2007 isolate_(isolate) {
2007 } 2008 }
2008 2009
2009 2010
2010 Debugger::~Debugger() { 2011 Debugger::~Debugger() {
2011 delete debugger_access_;
2012 debugger_access_ = 0;
2013 delete dispatch_handler_access_; 2012 delete dispatch_handler_access_;
2014 dispatch_handler_access_ = 0; 2013 dispatch_handler_access_ = 0;
2015 delete command_received_; 2014 delete command_received_;
2016 command_received_ = 0; 2015 command_received_ = 0;
2017 } 2016 }
2018 2017
2019 2018
2020 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name, 2019 Handle<Object> Debugger::MakeJSObject(Vector<const char> constructor_name,
2021 int argc, Object*** argv, 2020 int argc, Object*** argv,
2022 bool* caught_exception) { 2021 bool* caught_exception) {
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 { 3177 {
3179 Locker locker; 3178 Locker locker;
3180 Isolate::Current()->debugger()->CallMessageDispatchHandler(); 3179 Isolate::Current()->debugger()->CallMessageDispatchHandler();
3181 } 3180 }
3182 } 3181 }
3183 } 3182 }
3184 3183
3185 #endif // ENABLE_DEBUGGER_SUPPORT 3184 #endif // ENABLE_DEBUGGER_SUPPORT
3186 3185
3187 } } // namespace v8::internal 3186 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.h ('k') | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698