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

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

Issue 2380413002: [DevTools] prepapre for null from createCallFrameLiveLocation (Closed)
Patch Set: a Created 4 years, 3 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 | « no previous file | 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/DebuggerWorkspaceBinding.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
index 256dc7a1e1811371943f940f77c11be7b1119f2f..605b5a9a7ea5e4d28663d241f022fbbac4075d1a 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/DebuggerWorkspaceBinding.js
@@ -152,12 +152,15 @@ WebInspector.DebuggerWorkspaceBinding.prototype = {
* @param {!WebInspector.DebuggerModel.Location} location
* @param {function(!WebInspector.LiveLocation)} updateDelegate
* @param {!WebInspector.LiveLocationPool} locationPool
- * @return {!WebInspector.DebuggerWorkspaceBinding.Location}
+ * @return {?WebInspector.DebuggerWorkspaceBinding.Location}
*/
createCallFrameLiveLocation: function(location, updateDelegate, locationPool)
{
+ var script = location.script();
+ if (!script)
+ return null;
var target = location.target();
- this._ensureInfoForScript(/** @type {!WebInspector.Script} */(location.script()));
+ this._ensureInfoForScript(script);
var liveLocation = this.createLiveLocation(location, updateDelegate, locationPool);
this._registerCallFrameLiveLocation(target, liveLocation);
return liveLocation;
@@ -601,7 +604,7 @@ WebInspector.DebuggerWorkspaceBinding.StackTraceTopFrameLocation = function(rawL
/** @type {!Set<!WebInspector.LiveLocation>} */
this._locations = new Set();
for (var location of rawLocations)
- this._locations.add(binding.createCallFrameLiveLocation(location, this._scheduleUpdate.bind(this), locationPool));
+ this._locations.add(binding.createLiveLocation(location, this._scheduleUpdate.bind(this), locationPool));
kozy 2016/09/30 19:26:32 We use it mostly for location of console messages
this._updateLocation();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698