| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium 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 "platform/v8_inspector/V8JavaScriptCallFrame.h" | 5 #include "platform/v8_inspector/V8JavaScriptCallFrame.h" |
| 6 | 6 |
| 7 #include "platform/v8_inspector/InspectorWrapper.h" | 7 #include "platform/v8_inspector/InspectorWrapper.h" |
| 8 #include "platform/v8_inspector/JavaScriptCallFrame.h" | 8 #include "platform/v8_inspector/JavaScriptCallFrame.h" |
| 9 #include "platform/v8_inspector/V8StringUtil.h" | 9 #include "platform/v8_inspector/V8StringUtil.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 {"scopeType", scopeTypeMethodCallback}, | 189 {"scopeType", scopeTypeMethodCallback}, |
| 190 {"scopeName", scopeNameMethodCallback}, | 190 {"scopeName", scopeNameMethodCallback}, |
| 191 {"scopeStartLocation", scopeStartLocationMethodCallback}, | 191 {"scopeStartLocation", scopeStartLocationMethodCallback}, |
| 192 {"scopeEndLocation", scopeEndLocationMethodCallback}, | 192 {"scopeEndLocation", scopeEndLocationMethodCallback}, |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 } // namespace | 195 } // namespace |
| 196 | 196 |
| 197 v8::Local<v8::FunctionTemplate> V8JavaScriptCallFrame::createWrapperTemplate(v8:
:Isolate* isolate) | 197 v8::Local<v8::FunctionTemplate> V8JavaScriptCallFrame::createWrapperTemplate(v8:
:Isolate* isolate) |
| 198 { | 198 { |
| 199 Vector<InspectorWrapperBase::V8MethodConfiguration> methods(WTF_ARRAY_LENGTH
(V8JavaScriptCallFrameMethods)); | 199 protocol::Vector<InspectorWrapperBase::V8MethodConfiguration> methods(WTF_AR
RAY_LENGTH(V8JavaScriptCallFrameMethods)); |
| 200 std::copy(V8JavaScriptCallFrameMethods, V8JavaScriptCallFrameMethods + WTF_A
RRAY_LENGTH(V8JavaScriptCallFrameMethods), methods.begin()); | 200 std::copy(V8JavaScriptCallFrameMethods, V8JavaScriptCallFrameMethods + WTF_A
RRAY_LENGTH(V8JavaScriptCallFrameMethods), methods.begin()); |
| 201 Vector<InspectorWrapperBase::V8AttributeConfiguration> attributes(WTF_ARRAY_
LENGTH(V8JavaScriptCallFrameAttributes)); | 201 protocol::Vector<InspectorWrapperBase::V8AttributeConfiguration> attributes(
WTF_ARRAY_LENGTH(V8JavaScriptCallFrameAttributes)); |
| 202 std::copy(V8JavaScriptCallFrameAttributes, V8JavaScriptCallFrameAttributes +
WTF_ARRAY_LENGTH(V8JavaScriptCallFrameAttributes), attributes.begin()); | 202 std::copy(V8JavaScriptCallFrameAttributes, V8JavaScriptCallFrameAttributes +
WTF_ARRAY_LENGTH(V8JavaScriptCallFrameAttributes), attributes.begin()); |
| 203 return JavaScriptCallFrameWrapper::createWrapperTemplate(isolate, methods, a
ttributes); | 203 return JavaScriptCallFrameWrapper::createWrapperTemplate(isolate, methods, a
ttributes); |
| 204 } | 204 } |
| 205 | 205 |
| 206 v8::Local<v8::Object> V8JavaScriptCallFrame::wrap(V8DebuggerClient* client, v8::
Local<v8::FunctionTemplate> constructorTemplate, v8::Local<v8::Context> context,
PassOwnPtr<JavaScriptCallFrame> frame) | 206 v8::Local<v8::Object> V8JavaScriptCallFrame::wrap(V8DebuggerClient* client, v8::
Local<v8::FunctionTemplate> constructorTemplate, v8::Local<v8::Context> context,
PassOwnPtr<JavaScriptCallFrame> frame) |
| 207 { | 207 { |
| 208 // Store template for .caller callback | 208 // Store template for .caller callback |
| 209 frame->setWrapperTemplate(constructorTemplate, context->GetIsolate()); | 209 frame->setWrapperTemplate(constructorTemplate, context->GetIsolate()); |
| 210 return JavaScriptCallFrameWrapper::wrap(client, constructorTemplate, context
, frame); | 210 return JavaScriptCallFrameWrapper::wrap(client, constructorTemplate, context
, frame); |
| 211 } | 211 } |
| 212 | 212 |
| 213 JavaScriptCallFrame* V8JavaScriptCallFrame::unwrap(v8::Local<v8::Context> contex
t, v8::Local<v8::Object> object) | 213 JavaScriptCallFrame* V8JavaScriptCallFrame::unwrap(v8::Local<v8::Context> contex
t, v8::Local<v8::Object> object) |
| 214 { | 214 { |
| 215 return JavaScriptCallFrameWrapper::unwrap(context, object); | 215 return JavaScriptCallFrameWrapper::unwrap(context, object); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |