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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js

Issue 2962063002: DevTools: eliminate {Default,Resource}ScriptMapping.addScript method (Closed)
Patch Set: remove code from breakpoint-manager.js Created 3 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
index 49977602fc35469585ea8ba478f693366ca6787c..48e86cc5bd6ce29222c7556cb670e19228ae705c 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
@@ -49,6 +49,9 @@ Bindings.ResourceScriptMapping = class {
this._eventListeners = [
debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, this._debuggerReset, this),
+ debuggerModel.addEventListener(SDK.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this),
+ debuggerModel.addEventListener(
+ SDK.DebuggerModel.Events.FailedToParseScriptSource, this._parsedScriptSource, this),
workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, this._uiSourceCodeAdded, this),
workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeRemoved, this._uiSourceCodeRemoved, this)
];
@@ -99,9 +102,10 @@ Bindings.ResourceScriptMapping = class {
}
/**
- * @param {!SDK.Script} script
+ * @param {!Common.Event} event
*/
- addScript(script) {
+ _parsedScriptSource(event) {
+ var script = /** @type {!SDK.Script} */ (event.data);
if (script.isAnonymousScript())
return;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698