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

Side by Side Diff: src/api.cc

Issue 2589203002: [debugger] deprecate v8::Debug:GetDebugContext. (Closed)
Patch Set: remove deprecated use Created 3 years, 11 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
« no previous file with comments | « include/v8-debug.h ('k') | src/inspector/v8-debugger.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 8882 matching lines...) Expand 10 before | Expand all | Expand 10 after
8893 RETURN_ON_FAILED_EXECUTION(Value); 8893 RETURN_ON_FAILED_EXECUTION(Value);
8894 RETURN_ESCAPED(result); 8894 RETURN_ESCAPED(result);
8895 } 8895 }
8896 8896
8897 void Debug::ProcessDebugMessages(Isolate* isolate) { 8897 void Debug::ProcessDebugMessages(Isolate* isolate) {
8898 reinterpret_cast<i::Isolate*>(isolate)->debug()->ProcessDebugMessages(true); 8898 reinterpret_cast<i::Isolate*>(isolate)->debug()->ProcessDebugMessages(true);
8899 } 8899 }
8900 8900
8901 8901
8902 Local<Context> Debug::GetDebugContext(Isolate* isolate) { 8902 Local<Context> Debug::GetDebugContext(Isolate* isolate) {
8903 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 8903 return debug::GetDebugContext(isolate);
8904 ENTER_V8(i_isolate);
8905 return Utils::ToLocal(i_isolate->debug()->GetDebugContext());
8906 } 8904 }
8907 8905
8908 8906
8909 MaybeLocal<Context> Debug::GetDebuggedContext(Isolate* isolate) { 8907 MaybeLocal<Context> Debug::GetDebuggedContext(Isolate* isolate) {
8910 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); 8908 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8911 ENTER_V8(i_isolate); 8909 ENTER_V8(i_isolate);
8912 if (!i_isolate->debug()->in_debug_scope()) return MaybeLocal<Context>(); 8910 if (!i_isolate->debug()->in_debug_scope()) return MaybeLocal<Context>();
8913 i::Handle<i::Object> calling = i_isolate->GetCallingNativeContext(); 8911 i::Handle<i::Object> calling = i_isolate->GetCallingNativeContext();
8914 if (calling.is_null()) return MaybeLocal<Context>(); 8912 if (calling.is_null()) return MaybeLocal<Context>();
8915 return Utils::ToLocal(i::Handle<i::Context>::cast(calling)); 8913 return Utils::ToLocal(i::Handle<i::Context>::cast(calling));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
8948 i::HandleScope scope(i_isolate); 8946 i::HandleScope scope(i_isolate);
8949 i::Handle<i::Object> foreign = i_isolate->factory()->undefined_value(); 8947 i::Handle<i::Object> foreign = i_isolate->factory()->undefined_value();
8950 if (that != NULL) { 8948 if (that != NULL) {
8951 foreign = i_isolate->factory()->NewForeign(FUNCTION_ADDR(that)); 8949 foreign = i_isolate->factory()->NewForeign(FUNCTION_ADDR(that));
8952 } 8950 }
8953 i_isolate->debug()->SetEventListener(foreign, Utils::OpenHandle(*data, true)); 8951 i_isolate->debug()->SetEventListener(foreign, Utils::OpenHandle(*data, true));
8954 return true; 8952 return true;
8955 } 8953 }
8956 8954
8957 Local<Context> debug::GetDebugContext(Isolate* isolate) { 8955 Local<Context> debug::GetDebugContext(Isolate* isolate) {
8958 return Debug::GetDebugContext(isolate); 8956 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
8957 ENTER_V8(i_isolate);
8958 return Utils::ToLocal(i_isolate->debug()->GetDebugContext());
8959 } 8959 }
8960 8960
8961 MaybeLocal<Value> debug::Call(Local<Context> context, 8961 MaybeLocal<Value> debug::Call(Local<Context> context,
8962 v8::Local<v8::Function> fun, 8962 v8::Local<v8::Function> fun,
8963 v8::Local<v8::Value> data) { 8963 v8::Local<v8::Value> data) {
8964 return Debug::Call(context, fun, data); 8964 return Debug::Call(context, fun, data);
8965 } 8965 }
8966 8966
8967 void debug::SetLiveEditEnabled(Isolate* isolate, bool enable) { 8967 void debug::SetLiveEditEnabled(Isolate* isolate, bool enable) {
8968 Debug::SetLiveEditEnabled(isolate, enable); 8968 Debug::SetLiveEditEnabled(isolate, enable);
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after
9976 Address callback_address = 9976 Address callback_address =
9977 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 9977 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
9978 VMState<EXTERNAL> state(isolate); 9978 VMState<EXTERNAL> state(isolate);
9979 ExternalCallbackScope call_scope(isolate, callback_address); 9979 ExternalCallbackScope call_scope(isolate, callback_address);
9980 callback(info); 9980 callback(info);
9981 } 9981 }
9982 9982
9983 9983
9984 } // namespace internal 9984 } // namespace internal
9985 } // namespace v8 9985 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-debug.h ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698