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

Unified Diff: Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 352983004: DevTools: add more jsdocs to NetworkPanel. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 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
Index: Source/devtools/front_end/sources/JavaScriptSourceFrame.js
diff --git a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index 0d197750ebc3a451842c6ab870d148dd0da6dd25..018bf7dced863929f7361df00afed52850bbe8b2 100644
--- a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -424,17 +424,17 @@ WebInspector.JavaScriptSourceFrame.prototype = {
{
var target = WebInspector.context.flavor(WebInspector.Target);
if (!target || !target.debuggerModel.isPaused())
- return null;
+ return;
var textPosition = this.textEditor.coordinatesToCursorPosition(event.x, event.y);
if (!textPosition)
- return null;
+ return;
var mouseLine = textPosition.startLine;
var mouseColumn = textPosition.startColumn;
var textSelection = this.textEditor.selection().normalize();
if (textSelection && !textSelection.isEmpty()) {
if (textSelection.startLine !== textSelection.endLine || textSelection.startLine !== mouseLine || mouseColumn < textSelection.startColumn || mouseColumn > textSelection.endColumn)
- return null;
+ return;
var leftCorner = this.textEditor.cursorPositionToCoordinates(textSelection.startLine, textSelection.startColumn);
var rightCorner = this.textEditor.cursorPositionToCoordinates(textSelection.endLine, textSelection.endColumn);
@@ -450,14 +450,14 @@ WebInspector.JavaScriptSourceFrame.prototype = {
var token = this.textEditor.tokenAtTextPosition(textPosition.startLine, textPosition.startColumn);
if (!token)
- return null;
+ return;
var lineNumber = textPosition.startLine;
var line = this.textEditor.line(lineNumber);
var tokenContent = line.substring(token.startColumn, token.endColumn + 1);
var isIdentifier = token.type.startsWith("js-variable") || token.type.startsWith("js-property") || token.type == "js-def";
if (!isIdentifier && (token.type !== "js-keyword" || tokenContent !== "this"))
- return null;
+ return;
var leftCorner = this.textEditor.cursorPositionToCoordinates(lineNumber, token.startColumn);
var rightCorner = this.textEditor.cursorPositionToCoordinates(lineNumber, token.endColumn + 1);
« no previous file with comments | « Source/devtools/front_end/profiler/CanvasProfileView.js ('k') | Source/devtools/front_end/timeline/TimelineView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698