Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp

Issue 1758313002: DevTools: introduce collections shim to be backed by non-wtf in v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
index bd58710ae1629a7d917f87f0f38d410106231ffe..b933bd8a09488c5c135187f6eb0f2ff2f0ab6079 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8AsyncCallTracker.cpp
@@ -4,7 +4,7 @@
#include "platform/v8_inspector/V8AsyncCallTracker.h"
-#include "wtf/HashMap.h"
+#include "platform/inspector_protocol/Collections.h"
#include "wtf/text/StringBuilder.h"
#include "wtf/text/StringHash.h"
#include "wtf/text/WTFString.h"
@@ -45,7 +45,7 @@ void V8AsyncCallTracker::asyncCallTrackingStateChanged(bool)
void V8AsyncCallTracker::resetAsyncOperations()
{
for (auto& it : m_idToOperations)
- completeOperations(it.value->map);
+ completeOperations(it.second->map);
m_idToOperations.clear();
}
@@ -87,7 +87,8 @@ void V8AsyncCallTracker::didEnqueueV8AsyncTask(v8::Local<v8::Context> context, c
newOperations->contextId = contextId;
newOperations->target = this;
newOperations->context.Reset(context->GetIsolate(), context);
- operations = m_idToOperations.set(contextId, newOperations.release()).storedValue->value.get();
+ operations = newOperations.get();
+ m_idToOperations.set(contextId, newOperations.release());
operations->context.SetWeak(operations, V8AsyncCallTracker::weakCallback, v8::WeakCallbackType::kParameter);
}
operations->map.set(makeV8AsyncTaskUniqueId(eventName, id), operationId);
@@ -109,10 +110,10 @@ void V8AsyncCallTracker::willHandleV8AsyncTask(v8::Local<v8::Context> context, c
}
}
-void V8AsyncCallTracker::completeOperations(const HashMap<String, int>& contextCallChains)
+void V8AsyncCallTracker::completeOperations(const protocol::HashMap<String, int>& contextCallChains)
{
- for (auto& it : contextCallChains)
- m_debuggerAgent->traceAsyncOperationCompleted(it.value);
+ for (const auto& it : contextCallChains)
+ m_debuggerAgent->traceAsyncOperationCompleted(*it.second);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698