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

Side by Side Diff: src/inspector/java-script-call-frame.cc

Issue 2549133002: [debug] Remove DebugInterface class (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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 v8::MaybeLocal<v8::Value> JavaScriptCallFrame::restart() { 122 v8::MaybeLocal<v8::Value> JavaScriptCallFrame::restart() {
123 v8::MicrotasksScope microtasks(m_isolate, 123 v8::MicrotasksScope microtasks(m_isolate,
124 v8::MicrotasksScope::kDoNotRunMicrotasks); 124 v8::MicrotasksScope::kDoNotRunMicrotasks);
125 v8::Local<v8::Context> context = 125 v8::Local<v8::Context> context =
126 v8::Local<v8::Context>::New(m_isolate, m_debuggerContext); 126 v8::Local<v8::Context>::New(m_isolate, m_debuggerContext);
127 v8::Local<v8::Object> callFrame = 127 v8::Local<v8::Object> callFrame =
128 v8::Local<v8::Object>::New(m_isolate, m_callFrame); 128 v8::Local<v8::Object>::New(m_isolate, m_callFrame);
129 v8::Local<v8::Function> restartFunction = v8::Local<v8::Function>::Cast( 129 v8::Local<v8::Function> restartFunction = v8::Local<v8::Function>::Cast(
130 callFrame->Get(context, toV8StringInternalized(m_isolate, "restart")) 130 callFrame->Get(context, toV8StringInternalized(m_isolate, "restart"))
131 .ToLocalChecked()); 131 .ToLocalChecked());
132 v8::DebugInterface::SetLiveEditEnabled(m_isolate, true); 132 v8::debug::DebugInterface::SetLiveEditEnabled(m_isolate, true);
133 v8::MaybeLocal<v8::Value> result = restartFunction->Call( 133 v8::MaybeLocal<v8::Value> result = restartFunction->Call(
134 m_debuggerContext.Get(m_isolate), callFrame, 0, nullptr); 134 m_debuggerContext.Get(m_isolate), callFrame, 0, nullptr);
135 v8::DebugInterface::SetLiveEditEnabled(m_isolate, false); 135 v8::debug::DebugInterface::SetLiveEditEnabled(m_isolate, false);
136 return result; 136 return result;
137 } 137 }
138 138
139 v8::MaybeLocal<v8::Value> JavaScriptCallFrame::setVariableValue( 139 v8::MaybeLocal<v8::Value> JavaScriptCallFrame::setVariableValue(
140 int scopeNumber, v8::Local<v8::Value> variableName, 140 int scopeNumber, v8::Local<v8::Value> variableName,
141 v8::Local<v8::Value> newValue) { 141 v8::Local<v8::Value> newValue) {
142 v8::MicrotasksScope microtasks(m_isolate, 142 v8::MicrotasksScope microtasks(m_isolate,
143 v8::MicrotasksScope::kDoNotRunMicrotasks); 143 v8::MicrotasksScope::kDoNotRunMicrotasks);
144 v8::Local<v8::Context> context = 144 v8::Local<v8::Context> context =
145 v8::Local<v8::Context>::New(m_isolate, m_debuggerContext); 145 v8::Local<v8::Context>::New(m_isolate, m_debuggerContext);
146 v8::Local<v8::Object> callFrame = 146 v8::Local<v8::Object> callFrame =
147 v8::Local<v8::Object>::New(m_isolate, m_callFrame); 147 v8::Local<v8::Object>::New(m_isolate, m_callFrame);
148 v8::Local<v8::Function> setVariableValueFunction = 148 v8::Local<v8::Function> setVariableValueFunction =
149 v8::Local<v8::Function>::Cast( 149 v8::Local<v8::Function>::Cast(
150 callFrame 150 callFrame
151 ->Get(context, 151 ->Get(context,
152 toV8StringInternalized(m_isolate, "setVariableValue")) 152 toV8StringInternalized(m_isolate, "setVariableValue"))
153 .ToLocalChecked()); 153 .ToLocalChecked());
154 v8::Local<v8::Value> argv[] = { 154 v8::Local<v8::Value> argv[] = {
155 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), 155 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)),
156 variableName, newValue}; 156 variableName, newValue};
157 return setVariableValueFunction->Call(context, callFrame, arraysize(argv), 157 return setVariableValueFunction->Call(context, callFrame, arraysize(argv),
158 argv); 158 argv);
159 } 159 }
160 160
161 } // namespace v8_inspector 161 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698