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

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: Add layout test 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 0937c3ef878adb27e61b22c3b300ae9387de8d87..1f23d0f4246b9294151d66826327ecedea21c340 100644
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js
@@ -347,11 +347,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.
+ const origin = Common.ParsedURL.extractOrigin(request ? request.url() : frame.url);
lushnikov 2017/03/21 18:26:36 nit: we don't use 'const' since it causes V8 deopt
elawrence 2017/03/22 01:04:41 Done.
+ 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