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

Side by Side Diff: src/debug.cc

Issue 6048003: Fix leak of a global handle in Debug::Load(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years 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 | « no previous file | no next file » | 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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
851 Debugger::set_compiling_natives(false); 851 Debugger::set_compiling_natives(false);
852 852
853 // Make sure we mark the debugger as not loading before we might 853 // Make sure we mark the debugger as not loading before we might
854 // return. 854 // return.
855 Debugger::set_loading_debugger(false); 855 Debugger::set_loading_debugger(false);
856 856
857 // Check for caught exceptions. 857 // Check for caught exceptions.
858 if (caught_exception) return false; 858 if (caught_exception) return false;
859 859
860 // Debugger loaded. 860 // Debugger loaded.
861 debug_context_ = Handle<Context>::cast(GlobalHandles::Create(*context)); 861 debug_context_ = context;
862 862
863 return true; 863 return true;
864 } 864 }
865 865
866 866
867 void Debug::Unload() { 867 void Debug::Unload() {
868 // Return debugger is not loaded. 868 // Return debugger is not loaded.
869 if (!IsLoaded()) { 869 if (!IsLoaded()) {
870 return; 870 return;
871 } 871 }
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3070 { 3070 {
3071 Locker locker; 3071 Locker locker;
3072 Debugger::CallMessageDispatchHandler(); 3072 Debugger::CallMessageDispatchHandler();
3073 } 3073 }
3074 } 3074 }
3075 } 3075 }
3076 3076
3077 #endif // ENABLE_DEBUGGER_SUPPORT 3077 #endif // ENABLE_DEBUGGER_SUPPORT
3078 3078
3079 } } // namespace v8::internal 3079 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698