OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "platform/v8_inspector/JavaScriptCallFrame.h" | 31 #include "platform/v8_inspector/JavaScriptCallFrame.h" |
32 | 32 |
| 33 #include "platform/v8_inspector/StringUtil.h" |
33 #include "platform/v8_inspector/V8Compat.h" | 34 #include "platform/v8_inspector/V8Compat.h" |
34 #include "platform/v8_inspector/V8StringUtil.h" | |
35 | 35 |
36 #include <v8-debug.h> | 36 #include <v8-debug.h> |
37 | 37 |
38 namespace v8_inspector { | 38 namespace v8_inspector { |
39 | 39 |
40 JavaScriptCallFrame::JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext,
v8::Local<v8::Object> callFrame) | 40 JavaScriptCallFrame::JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext,
v8::Local<v8::Object> callFrame) |
41 : m_isolate(debuggerContext->GetIsolate()) | 41 : m_isolate(debuggerContext->GetIsolate()) |
42 , m_debuggerContext(m_isolate, debuggerContext) | 42 , m_debuggerContext(m_isolate, debuggerContext) |
43 , m_callFrame(m_isolate, callFrame) | 43 , m_callFrame(m_isolate, callFrame) |
44 { | 44 { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 v8::MaybeLocal<v8::Value> JavaScriptCallFrame::setVariableValue(int scopeNumber,
v8::Local<v8::Value> variableName, v8::Local<v8::Value> newValue) | 120 v8::MaybeLocal<v8::Value> JavaScriptCallFrame::setVariableValue(int scopeNumber,
v8::Local<v8::Value> variableName, v8::Local<v8::Value> newValue) |
121 { | 121 { |
122 v8::MicrotasksScope microtasks(m_isolate, v8::MicrotasksScope::kDoNotRunMicr
otasks); | 122 v8::MicrotasksScope microtasks(m_isolate, v8::MicrotasksScope::kDoNotRunMicr
otasks); |
123 v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_ca
llFrame); | 123 v8::Local<v8::Object> callFrame = v8::Local<v8::Object>::New(m_isolate, m_ca
llFrame); |
124 v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>::
Cast(callFrame->Get(toV8StringInternalized(m_isolate, "setVariableValue"))); | 124 v8::Local<v8::Function> setVariableValueFunction = v8::Local<v8::Function>::
Cast(callFrame->Get(toV8StringInternalized(m_isolate, "setVariableValue"))); |
125 v8::Local<v8::Value> argv[] = { | 125 v8::Local<v8::Value> argv[] = { |
126 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), | 126 v8::Local<v8::Value>(v8::Integer::New(m_isolate, scopeNumber)), |
127 variableName, | 127 variableName, |
128 newValue | 128 newValue |
129 }; | 129 }; |
130 return setVariableValueFunction->Call(m_debuggerContext.Get(m_isolate), call
Frame, PROTOCOL_ARRAY_LENGTH(argv), argv); | 130 return setVariableValueFunction->Call(m_debuggerContext.Get(m_isolate), call
Frame, V8_INSPECTOR_ARRAY_LENGTH(argv), argv); |
131 } | 131 } |
132 | 132 |
133 } // namespace v8_inspector | 133 } // namespace v8_inspector |
OLD | NEW |