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

Unified Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 2756983002: [DevTools] Fallback to MainFrameNavigated event url in Security panel (Closed)
Patch Set: Rebase, change const to let 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/devtools/front_end/security/SecurityPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
index 46d6acf92f9d6cdaf476aff504e85c0f6d47b85a..b33cdad84704fb436f124590302eb85918ac9b0d 100644
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
@@ -350,11 +350,14 @@ Security.SecurityPanel = class extends UI.PanelWithSidebar {
// explanations to reflect the new counts.
this._mainView.refreshExplanations();
- if (request) {
- var origin = Common.ParsedURL.extractOrigin(request.url());
- this._sidebarTree.setMainOrigin(origin);
+ // If we could not find a matching request (as in the case of clicking
+ // through an interstitial, see crbug.com/669309), set the origin based upon
+ // the url data from the MainFrameNavigated event itself.
+ let origin = Common.ParsedURL.extractOrigin(request ? request.url() : frame.url);
+ this._sidebarTree.setMainOrigin(origin);
+
+ if (request)
this._processRequest(request);
- }
}
_onInterstitialShown() {
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/security/main-origin-assigned-despite-request-missing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698