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

Issue 2843073003: DevTools: linkifier incorrectly matches port numbers in urls as line numbers (Closed)

Created:
3 years, 8 months ago by luoe
Modified:
3 years, 7 months ago
Reviewers:
dgozman, alph, allada
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: linkifier incorrectly matches port numbers in urls as line numbers When logging a URL with a port number in the console, 'http://localhost:8000', our linkifier incorrectly treats the '8000' port number as a line number. Using our existing granular URL regexes, this patch makes the linkifier ignore the URL part before the 'path' when looking for a line/column number. BUG=701865 Review-Url: https://codereview.chromium.org/2843073003 Cr-Commit-Position: refs/heads/master@{#467868} Committed: https://chromium.googlesource.com/chromium/src/+/201eaf7de7e46e23f5955dc8b57db0d76add14c2

Patch Set 1 : a #

Patch Set 2 : use regex group instead of a flag #

Total comments: 2

Patch Set 3 : added test #

Total comments: 2

Patch Set 4 : move test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -15 lines) Patch
M third_party/WebKit/LayoutTests/inspector/components/parsed-url.html View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/inspector/components/parsed-url-expected.txt View 1 2 3 1 chunk +28 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js View 1 5 chunks +25 lines, -15 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
luoe
Please take a look
3 years, 8 months ago (2017-04-26 21:27:23 UTC) #5
alph
Looks like it's possible to make a test. https://codereview.chromium.org/2843073003/diff/60001/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js File third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js (right): https://codereview.chromium.org/2843073003/diff/60001/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js#newcode215 third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js:215: var ...
3 years, 8 months ago (2017-04-26 22:00:06 UTC) #7
luoe
Test added! https://codereview.chromium.org/2843073003/diff/60001/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js File third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js (right): https://codereview.chromium.org/2843073003/diff/60001/third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js#newcode215 third_party/WebKit/Source/devtools/front_end/common/ParsedURL.js:215: var beforePathMatch = string.match(Common.ParsedURL._urlRegex()); On 2017/04/26 22:00:05, ...
3 years, 8 months ago (2017-04-26 23:45:05 UTC) #8
dgozman
Nice patch! https://codereview.chromium.org/2843073003/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js File third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js (right): https://codereview.chromium.org/2843073003/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js#newcode8 third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js:8: testSplitLineColumn("http://www.chromium.org"); Add to existing parsed-url.html test.
3 years, 7 months ago (2017-04-27 17:03:29 UTC) #9
luoe
Test moved. https://codereview.chromium.org/2843073003/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js File third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js (right): https://codereview.chromium.org/2843073003/diff/80001/third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js#newcode8 third_party/WebKit/LayoutTests/http/tests/inspector-unit/parse-urls-line-column.js:8: testSplitLineColumn("http://www.chromium.org"); On 2017/04/27 17:03:29, dgozman wrote: > ...
3 years, 7 months ago (2017-04-27 17:43:59 UTC) #10
dgozman
lgtm
3 years, 7 months ago (2017-04-27 22:55:03 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2843073003/100001
3 years, 7 months ago (2017-04-27 22:56:31 UTC) #13
commit-bot: I haz the power
3 years, 7 months ago (2017-04-28 03:21:09 UTC) #16
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/201eaf7de7e46e23f5955dc8b57d...

Powered by Google App Engine
This is Rietveld 408576698