Index: src/inspector/v8-inspector-impl.cc |
diff --git a/src/inspector/v8-inspector-impl.cc b/src/inspector/v8-inspector-impl.cc |
index ec6c65f60868cbd8d7a43e2ac49153b39fdc0450..5c5d7b96d4780542d69b7cb1cc48572a662a687e 100644 |
--- a/src/inspector/v8-inspector-impl.cc |
+++ b/src/inspector/v8-inspector-impl.cc |
@@ -45,7 +45,7 @@ namespace v8_inspector { |
std::unique_ptr<V8Inspector> V8Inspector::create(v8::Isolate* isolate, |
V8InspectorClient* client) { |
- return wrapUnique(new V8InspectorImpl(isolate, client)); |
+ return std::unique_ptr<V8Inspector>(new V8InspectorImpl(isolate, client)); |
} |
V8InspectorImpl::V8InspectorImpl(v8::Isolate* isolate, |
@@ -163,12 +163,12 @@ V8ConsoleMessageStorage* V8InspectorImpl::ensureConsoleMessageStorage( |
ConsoleStorageMap::iterator storageIt = |
m_consoleStorageMap.find(contextGroupId); |
if (storageIt == m_consoleStorageMap.end()) |
- storageIt = |
- m_consoleStorageMap |
- .insert(std::make_pair( |
- contextGroupId, |
- wrapUnique(new V8ConsoleMessageStorage(this, contextGroupId)))) |
- .first; |
+ storageIt = m_consoleStorageMap |
+ .insert(std::make_pair( |
+ contextGroupId, |
+ std::unique_ptr<V8ConsoleMessageStorage>( |
+ new V8ConsoleMessageStorage(this, contextGroupId)))) |
+ .first; |
return storageIt->second.get(); |
} |
@@ -217,15 +217,16 @@ void V8InspectorImpl::contextCreated(const V8ContextInfo& info) { |
ContextsByGroupMap::iterator contextIt = m_contexts.find(info.contextGroupId); |
if (contextIt == m_contexts.end()) |
contextIt = m_contexts |
- .insert(std::make_pair(info.contextGroupId, |
- wrapUnique(new ContextByIdMap()))) |
+ .insert(std::make_pair( |
+ info.contextGroupId, |
+ std::unique_ptr<ContextByIdMap>(new ContextByIdMap()))) |
.first; |
const auto& contextById = contextIt->second; |
DCHECK(contextById->find(contextId) == contextById->cend()); |
InspectedContext* context = new InspectedContext(this, info, contextId); |
- (*contextById)[contextId] = wrapUnique(context); |
+ (*contextById)[contextId].reset(context); |
SessionMap::iterator sessionIt = m_sessions.find(info.contextGroupId); |
if (sessionIt != m_sessions.end()) |
sessionIt->second->runtimeAgent()->reportExecutionContextCreated(context); |
@@ -291,8 +292,8 @@ unsigned V8InspectorImpl::exceptionThrown( |
std::unique_ptr<V8StackTrace> stackTrace, int scriptId) { |
int contextGroupId = V8Debugger::getGroupId(context); |
if (!contextGroupId || m_muteExceptionsMap[contextGroupId]) return 0; |
- std::unique_ptr<V8StackTraceImpl> stackTraceImpl = |
- wrapUnique(static_cast<V8StackTraceImpl*>(stackTrace.release())); |
+ std::unique_ptr<V8StackTraceImpl> stackTraceImpl( |
+ static_cast<V8StackTraceImpl*>(stackTrace.release())); |
unsigned exceptionId = nextExceptionId(); |
std::unique_ptr<V8ConsoleMessage> consoleMessage = |
V8ConsoleMessage::createForException( |