| 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 5727f8e847aa2fae9ba9653ffe401e48bb734334..2485db5ff058880cdfdfbca6483410aae1212287 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.cpp
|
| @@ -79,7 +79,7 @@ void V8RuntimeAgentImpl::evaluate(
|
| const Maybe<bool>& returnByValue,
|
| const Maybe<bool>& generatePreview,
|
| const Maybe<bool>& userGesture,
|
| - OwnPtr<RemoteObject>* result,
|
| + std::unique_ptr<RemoteObject>* result,
|
| Maybe<bool>* wasThrown,
|
| Maybe<ExceptionDetails>* exceptionDetails)
|
| {
|
| @@ -141,19 +141,19 @@ void V8RuntimeAgentImpl::callFunctionOn(ErrorString* errorString,
|
| const Maybe<bool>& returnByValue,
|
| const Maybe<bool>& generatePreview,
|
| const Maybe<bool>& userGesture,
|
| - OwnPtr<RemoteObject>* result,
|
| + std::unique_ptr<RemoteObject>* result,
|
| Maybe<bool>* wasThrown)
|
| {
|
| InjectedScript::ObjectScope scope(errorString, m_debugger, m_session->contextGroupId(), objectId);
|
| if (!scope.initialize())
|
| return;
|
|
|
| - OwnPtr<v8::Local<v8::Value>[]> argv = nullptr;
|
| + std::unique_ptr<v8::Local<v8::Value>[]> argv = nullptr;
|
| int argc = 0;
|
| if (optionalArguments.isJust()) {
|
| protocol::Array<protocol::Runtime::CallArgument>* arguments = optionalArguments.fromJust();
|
| argc = arguments->length();
|
| - argv = adoptArrayPtr(new v8::Local<v8::Value>[argc]);
|
| + argv.reset(new v8::Local<v8::Value>[argc]);
|
| for (int i = 0; i < argc; ++i) {
|
| v8::Local<v8::Value> argumentValue;
|
| if (!scope.injectedScript()->resolveCallArgument(errorString, arguments->get(i)).ToLocal(&argumentValue))
|
| @@ -197,7 +197,7 @@ void V8RuntimeAgentImpl::getProperties(
|
| const Maybe<bool>& ownProperties,
|
| const Maybe<bool>& accessorPropertiesOnly,
|
| const Maybe<bool>& generatePreview,
|
| - OwnPtr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result,
|
| + std::unique_ptr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* result,
|
| Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* internalProperties,
|
| Maybe<ExceptionDetails>* exceptionDetails)
|
| {
|
| @@ -220,7 +220,7 @@ void V8RuntimeAgentImpl::getProperties(
|
| v8::Local<v8::Array> propertiesArray;
|
| if (hasInternalError(errorString, !v8::Debug::GetInternalProperties(m_debugger->isolate(), scope.object()).ToLocal(&propertiesArray)))
|
| return;
|
| - OwnPtr<protocol::Array<InternalPropertyDescriptor>> propertiesProtocolArray = protocol::Array<InternalPropertyDescriptor>::create();
|
| + std::unique_ptr<protocol::Array<InternalPropertyDescriptor>> propertiesProtocolArray = protocol::Array<InternalPropertyDescriptor>::create();
|
| for (uint32_t i = 0; i < propertiesArray->Length(); i += 2) {
|
| v8::Local<v8::Value> name;
|
| if (hasInternalError(errorString, !propertiesArray->Get(scope.context(), i).ToLocal(&name)) || !name->IsString())
|
| @@ -228,7 +228,7 @@ void V8RuntimeAgentImpl::getProperties(
|
| v8::Local<v8::Value> value;
|
| if (hasInternalError(errorString, !propertiesArray->Get(scope.context(), i + 1).ToLocal(&value)))
|
| return;
|
| - OwnPtr<RemoteObject> wrappedValue = scope.injectedScript()->wrapObject(errorString, value, scope.objectGroupName());
|
| + std::unique_ptr<RemoteObject> wrappedValue = scope.injectedScript()->wrapObject(errorString, value, scope.objectGroupName());
|
| if (!wrappedValue)
|
| return;
|
| propertiesProtocolArray->addItem(InternalPropertyDescriptor::create()
|
| @@ -294,7 +294,7 @@ void V8RuntimeAgentImpl::compileScript(ErrorString* errorString,
|
| return;
|
|
|
| String16 scriptValueId = String16::number(script->GetUnboundScript()->GetId());
|
| - OwnPtr<v8::Global<v8::Script>> global = adoptPtr(new v8::Global<v8::Script>(m_debugger->isolate(), script));
|
| + std::unique_ptr<v8::Global<v8::Script>> global(new v8::Global<v8::Script>(m_debugger->isolate(), script));
|
| m_compiledScripts.set(scriptValueId, std::move(global));
|
| *scriptId = scriptValueId;
|
| }
|
| @@ -305,7 +305,7 @@ void V8RuntimeAgentImpl::runScript(ErrorString* errorString,
|
| const Maybe<String16>& objectGroup,
|
| const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
|
| const Maybe<bool>& includeCommandLineAPI,
|
| - OwnPtr<RemoteObject>* result,
|
| + std::unique_ptr<RemoteObject>* result,
|
| Maybe<ExceptionDetails>* exceptionDetails)
|
| {
|
| if (!m_enabled) {
|
| @@ -325,7 +325,7 @@ void V8RuntimeAgentImpl::runScript(ErrorString* errorString,
|
| if (doNotPauseOnExceptionsAndMuteConsole.fromMaybe(false))
|
| scope.ignoreExceptionsAndMuteConsole();
|
|
|
| - OwnPtr<v8::Global<v8::Script>> scriptWrapper = m_compiledScripts.take(scriptId);
|
| + std::unique_ptr<v8::Global<v8::Script>> scriptWrapper = m_compiledScripts.take(scriptId);
|
| v8::Local<v8::Script> script = scriptWrapper->Get(m_debugger->isolate());
|
| if (script.IsEmpty()) {
|
| *errorString = "Script execution failed";
|
| @@ -393,7 +393,7 @@ void V8RuntimeAgentImpl::reportExecutionContextCreated(InspectedContext* context
|
| if (!m_enabled)
|
| return;
|
| context->setReported(true);
|
| - OwnPtr<protocol::Runtime::ExecutionContextDescription> description = protocol::Runtime::ExecutionContextDescription::create()
|
| + std::unique_ptr<protocol::Runtime::ExecutionContextDescription> description = protocol::Runtime::ExecutionContextDescription::create()
|
| .setId(context->contextId())
|
| .setIsDefault(context->isDefault())
|
| .setName(context->humanReadableName())
|
| @@ -410,7 +410,7 @@ void V8RuntimeAgentImpl::reportExecutionContextDestroyed(InspectedContext* conte
|
| }
|
| }
|
|
|
| -void V8RuntimeAgentImpl::inspect(PassOwnPtr<protocol::Runtime::RemoteObject> objectToInspect, PassOwnPtr<protocol::DictionaryValue> hints)
|
| +void V8RuntimeAgentImpl::inspect(std::unique_ptr<protocol::Runtime::RemoteObject> objectToInspect, std::unique_ptr<protocol::DictionaryValue> hints)
|
| {
|
| if (m_enabled)
|
| m_frontend->inspectRequested(std::move(objectToInspect), std::move(hints));
|
|
|