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

Side by Side Diff: src/api.cc

Issue 2531543002: [debug] mark more unused debug API as deprecated. (Closed)
Patch Set: . Created 4 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
« no previous file with comments | « include/v8-debug.h ('k') | src/compiler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 8738 matching lines...) Expand 10 before | Expand all | Expand 10 after
8749 has_pending_exception = 8749 has_pending_exception =
8750 !ToLocal<Value>(isolate->debug()->Call(Utils::OpenHandle(*fun), data_obj), 8750 !ToLocal<Value>(isolate->debug()->Call(Utils::OpenHandle(*fun), data_obj),
8751 &result); 8751 &result);
8752 RETURN_ON_FAILED_EXECUTION(Value); 8752 RETURN_ON_FAILED_EXECUTION(Value);
8753 RETURN_ESCAPED(result); 8753 RETURN_ESCAPED(result);
8754 } 8754 }
8755 8755
8756 8756
8757 MaybeLocal<Value> Debug::GetMirror(Local<Context> context, 8757 MaybeLocal<Value> Debug::GetMirror(Local<Context> context,
8758 v8::Local<v8::Value> obj) { 8758 v8::Local<v8::Value> obj) {
8759 PREPARE_FOR_EXECUTION(context, Debug, GetMirror, Value); 8759 UNIMPLEMENTED();
8760 i::Debug* isolate_debug = isolate->debug(); 8760 return MaybeLocal<Value>();
8761 has_pending_exception = !isolate_debug->Load();
8762 RETURN_ON_FAILED_EXECUTION(Value);
8763 i::Handle<i::JSObject> debug(isolate_debug->debug_context()->global_object());
8764 auto name = isolate->factory()->NewStringFromStaticChars("MakeMirror");
8765 auto fun_obj = i::JSReceiver::GetProperty(debug, name).ToHandleChecked();
8766 auto v8_fun = Utils::CallableToLocal(i::Handle<i::JSFunction>::cast(fun_obj));
8767 const int kArgc = 1;
8768 v8::Local<v8::Value> argv[kArgc] = {obj};
8769 Local<Value> result;
8770 has_pending_exception =
8771 !v8_fun->Call(context, Utils::ToLocal(debug), kArgc, argv)
8772 .ToLocal(&result);
8773 RETURN_ON_FAILED_EXECUTION(Value);
8774 RETURN_ESCAPED(result);
8775 } 8761 }
8776 8762
8777 void Debug::ProcessDebugMessages(Isolate* isolate) { UNIMPLEMENTED(); } 8763 void Debug::ProcessDebugMessages(Isolate* isolate) { UNIMPLEMENTED(); }
8778 8764
8779 Local<Context> Debug::GetDebugContext(Isolate* isolate) { 8765 Local<Context> Debug::GetDebugContext(Isolate* isolate) {
8780 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 8766 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8781 ENTER_V8(i_isolate); 8767 ENTER_V8(i_isolate);
8782 return Utils::ToLocal(i_isolate->debug()->GetDebugContext()); 8768 return Utils::ToLocal(i_isolate->debug()->GetDebugContext());
8783 } 8769 }
8784 8770
8785 8771
8786 MaybeLocal<Context> Debug::GetDebuggedContext(Isolate* isolate) { 8772 MaybeLocal<Context> Debug::GetDebuggedContext(Isolate* isolate) {
8787 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 8773 UNIMPLEMENTED();
8788 ENTER_V8(i_isolate); 8774 return MaybeLocal<Context>();
8789 if (!i_isolate->debug()->in_debug_scope()) return MaybeLocal<Context>();
8790 i::Handle<i::Object> calling = i_isolate->GetCallingNativeContext();
8791 if (calling.is_null()) return MaybeLocal<Context>();
8792 return Utils::ToLocal(i::Handle<i::Context>::cast(calling));
8793 } 8775 }
8794 8776
8795 void Debug::SetLiveEditEnabled(Isolate* isolate, bool enable) { 8777 void Debug::SetLiveEditEnabled(Isolate* isolate, bool enable) {
8796 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 8778 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8797 internal_isolate->debug()->set_live_edit_enabled(enable); 8779 internal_isolate->debug()->set_live_edit_enabled(enable);
8798 } 8780 }
8799 8781
8800 bool Debug::IsTailCallEliminationEnabled(Isolate* isolate) { 8782 bool Debug::IsTailCallEliminationEnabled(Isolate* isolate) {
8801 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 8783 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8802 return internal_isolate->is_tail_call_elimination_enabled(); 8784 return internal_isolate->is_tail_call_elimination_enabled();
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
9846 Address callback_address = 9828 Address callback_address =
9847 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9829 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9848 VMState<EXTERNAL> state(isolate); 9830 VMState<EXTERNAL> state(isolate);
9849 ExternalCallbackScope call_scope(isolate, callback_address); 9831 ExternalCallbackScope call_scope(isolate, callback_address);
9850 callback(info); 9832 callback(info);
9851 } 9833 }
9852 9834
9853 9835
9854 } // namespace internal 9836 } // namespace internal
9855 } // namespace v8 9837 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-debug.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698