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

Unified Diff: third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp

Issue 2776523005: Plumbing devtools agent host id and request id between processes (Closed)
Patch Set: Rebased Created 3 years, 8 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/core/inspector/IdentifiersFactory.cpp
diff --git a/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp b/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
index 0b8db126ef5d80eaf6ed2fcee54694e550f7253b..e663ccbad44766cb8599c44b0f6eaf18487eefed 100644
--- a/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
+++ b/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
@@ -49,6 +49,16 @@ String IdentifiersFactory::CreateIdentifier() {
// static
String IdentifiersFactory::RequestId(unsigned long identifier) {
+ // Odd request Ids are set by the browser. For those we use a PID of 0
+ // because for browser side navigations the PID may not be known when an event
+ // is sent because the renderer hasn't been created yet.
+ int signed_identifier = static_cast<int>(identifier);
+ if (signed_identifier < 0) {
+ StringBuilder builder;
+ builder.Append("0.");
+ builder.AppendNumber(signed_identifier);
+ return builder.ToString();
+ }
return identifier ? AddProcessIdPrefixTo(identifier) : String();
}
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698