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

Side by Side Diff: src/api.cc

Issue 21347: Make the debugger completely unload when the debug event listener is unregist... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 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 | « no previous file | 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 2875 matching lines...) Expand 10 before | Expand all | Expand 10 after
2886 } 2886 }
2887 2887
2888 2888
2889 // --- D e b u g S u p p o r t --- 2889 // --- D e b u g S u p p o r t ---
2890 2890
2891 2891
2892 bool Debug::SetDebugEventListener(DebugEventCallback that, Handle<Value> data) { 2892 bool Debug::SetDebugEventListener(DebugEventCallback that, Handle<Value> data) {
2893 EnsureInitialized("v8::Debug::SetDebugEventListener()"); 2893 EnsureInitialized("v8::Debug::SetDebugEventListener()");
2894 ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false); 2894 ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false);
2895 HandleScope scope; 2895 HandleScope scope;
2896 i::Debugger::SetEventListener(i::Factory::NewProxy(FUNCTION_ADDR(that)), 2896 i::Handle<i::Object> proxy = i::Factory::undefined_value();
2897 Utils::OpenHandle(*data)); 2897 if (that != NULL) {
2898 proxy = i::Factory::NewProxy(FUNCTION_ADDR(that));
2899 }
2900 i::Debugger::SetEventListener(proxy, Utils::OpenHandle(*data));
2898 return true; 2901 return true;
2899 } 2902 }
2900 2903
2901 2904
2902 bool Debug::SetDebugEventListener(v8::Handle<v8::Object> that, 2905 bool Debug::SetDebugEventListener(v8::Handle<v8::Object> that,
2903 Handle<Value> data) { 2906 Handle<Value> data) {
2904 ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false); 2907 ON_BAILOUT("v8::Debug::SetDebugEventListener()", return false);
2905 i::Debugger::SetEventListener(Utils::OpenHandle(*that), 2908 i::Debugger::SetEventListener(Utils::OpenHandle(*that),
2906 Utils::OpenHandle(*data)); 2909 Utils::OpenHandle(*data));
2907 return true; 2910 return true;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3020 reinterpret_cast<HandleScopeImplementer*>(storage); 3023 reinterpret_cast<HandleScopeImplementer*>(storage);
3021 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); 3024 List<void**>* blocks_of_archived_thread = thread_local->Blocks();
3022 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = 3025 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread =
3023 &thread_local->handle_scope_data_; 3026 &thread_local->handle_scope_data_;
3024 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); 3027 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread);
3025 3028
3026 return storage + ArchiveSpacePerThread(); 3029 return storage + ArchiveSpacePerThread();
3027 } 3030 }
3028 3031
3029 } } // namespace v8::internal 3032 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698