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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js

Issue 2610963005: [DevTools] Pass the frame payload (Closed)
Patch Set: [DevTools] Pass the frame payload Created 3 years, 11 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/sdk/ResourceTreeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
index eae9251e9005566caaf2e9310077938664f63d03..86c49325d281e93de343c88d2434a2200505fb47 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/ResourceTreeModel.js
@@ -129,13 +129,11 @@ SDK.ResourceTreeModel = class extends SDK.SDKModel {
*/
_addFrame(frame, aboutToNavigate) {
this._frames.set(frame.id, frame);
- if (frame.isMainFrame()) {
+ if (frame.isMainFrame())
this.mainFrame = frame;
- this._securityOriginManager.setMainSecurityOrigin(frame.url);
- }
this.dispatchEventToListeners(SDK.ResourceTreeModel.Events.FrameAdded, frame);
- if (!aboutToNavigate)
- this._securityOriginManager.addSecurityOrigin(frame.securityOrigin);
+ if (!aboutToNavigate && frame.securityOrigin)
+ this._securityOriginManager.addSecurityOrigin(frame.securityOrigin, frame.isMainFrame());
}
/**
@@ -206,7 +204,7 @@ SDK.ResourceTreeModel = class extends SDK.SDKModel {
Common.console.log(Common.UIString('Navigated to %s', frame.url));
}
if (addedOrigin)
- this._securityOriginManager.addSecurityOrigin(addedOrigin);
+ this._securityOriginManager.addSecurityOrigin(addedOrigin, frame.isMainFrame());
// Fill frame with retained resources (the ones loaded using new loader).
var resources = frame.resources();

Powered by Google App Engine
This is Rietveld 408576698