| Index: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| index dac95be11b5d65e70751095b81d9f729658e411c..b81e8a6a749d8145b6e45b0decf812a7524ed1bf 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| @@ -238,6 +238,35 @@ void V8RuntimeAgentImpl::getProperties(
|
| *internalProperties = propertiesProtocolArray.release();
|
| }
|
|
|
| +void V8RuntimeAgentImpl::getCompletions(
|
| + ErrorString* errorString,
|
| + const Maybe<String16>& objectId,
|
| + const Maybe<String16>& primitiveType,
|
| + OwnPtr<protocol::Array<String16>>* completions)
|
| +{
|
| + if (!objectId.isJust() && !primitiveType.isJust() && !(primitiveType.isJust() && objectId.isJust())) {
|
| + *errorString = "'objectId' or 'primitiveType 'should be passed.";
|
| + return;
|
| + }
|
| + if (objectId.isJust()) {
|
| + InjectedScript::ObjectScope scope(errorString, m_debugger, m_session->contextGroupId(), objectId.fromJust());
|
| + if (!scope.initialize())
|
| + return;
|
| + scope.injectedScript()->getCompletions(errorString, scope.object(), completions);
|
| + } else {
|
| + int contextId = m_debugger->client()->ensureDefaultContextInGroup(m_session->contextGroupId());
|
| + if (!contextId) {
|
| + *errorString = "Cannot find default execution context";
|
| + return;
|
| + }
|
| + InjectedScript::ContextScope scope(errorString, m_debugger, m_session->contextGroupId(), contextId);
|
| + if (!scope.initialize())
|
| + return;
|
| + scope.injectedScript()->getCompletions(errorString, primitiveType.fromJust(), completions);
|
| + }
|
| +}
|
| +
|
| +
|
| void V8RuntimeAgentImpl::releaseObject(ErrorString* errorString, const String16& objectId)
|
| {
|
| InjectedScript::ObjectScope scope(errorString, m_debugger, m_session->contextGroupId(), objectId);
|
|
|