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

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

Issue 2739983002: DevTools: cleanup script UISourceCodes on executionContextDestroyed (Closed)
Patch Set: ad jsdoc 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/sdk/DebuggerModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
index e6e758ebf8e9f00ec11c4f008efe2ce9c7ba7d71..47e2602f7e37d9726ab57d836ba053eff32358a3 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -346,6 +346,14 @@ SDK.DebuggerModel = class extends SDK.SDKModel {
}
/**
+ * @param {!SDK.ExecutionContext} executionContext
+ * @return {!Array<!SDK.Script>}
+ */
+ scriptsForExecutionContext(executionContext) {
+ return Object.values(this._scripts).filter(script => script.executionContextId === executionContext.id);
+ }
+
+ /**
* @param {!Protocol.Runtime.ScriptId} scriptId
* @param {string} newSource
* @param {function(?Protocol.Error, !Protocol.Runtime.ExceptionDetails=)} callback

Powered by Google App Engine
This is Rietveld 408576698