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

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: Full plumbing Created 3 years, 9 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 4ade71c32b6a51501765b9c4dc4f732300d27c9d..407b0f1037288ce90b63036f5736fbab111afa11 100644
--- a/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
+++ b/third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp
@@ -49,6 +49,15 @@ 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.
+ if (identifier & 1) {
+ StringBuilder builder;
+ builder.append("0.");
+ builder.appendNumber(identifier);
+ return builder.toString();
+ }
return identifier ? addProcessIdPrefixTo(identifier) : String();
}

Powered by Google App Engine
This is Rietveld 408576698