| Index: third_party/WebKit/Source/devtools/front_end/devtools.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/devtools.js b/third_party/WebKit/Source/devtools/front_end/devtools.js
|
| index dcbcd758dbdd774c2a3766b16ca9eb30344869a0..f9c05b2c74478b1c71c0139a5673d6f89bfff5f5 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/devtools.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/devtools.js
|
| @@ -964,8 +964,28 @@ function installObjectObserve()
|
| /**
|
| * @suppressGlobalPropertiesCheck
|
| */
|
| +function sanitizeRemoteFrontendUrl()
|
| +{
|
| + var queryParams = location.search;
|
| + if (!queryParams)
|
| + return;
|
| + var params = queryParams.substring(1).split("&");
|
| + for (var i = 0; i < params.length; ++i) {
|
| + var pair = params[i].split("=");
|
| + var name = pair.shift();
|
| + var value = pair.join("=");
|
| + if (name === "remoteFrontendUrl" && !value.startsWith("https://chrome-devtools-frontend.appspot.com/"))
|
| + location.search = "";
|
| + }
|
| +}
|
| +
|
| +/**
|
| + * @suppressGlobalPropertiesCheck
|
| + */
|
| function installBackwardsCompatibility()
|
| {
|
| + sanitizeRemoteFrontendUrl();
|
| +
|
| if (window.location.search.indexOf("remoteFrontend") === -1)
|
| return;
|
|
|
| @@ -1021,6 +1041,7 @@ function windowLoaded()
|
| installBackwardsCompatibility();
|
| }
|
|
|
| +sanitizeRemoteFrontendUrl();
|
| if (window.document.head && (window.document.readyState === "complete" || window.document.readyState === "interactive"))
|
| installBackwardsCompatibility();
|
| else
|
|
|