Commit 02ae5950 authored by Joel Einbinder's avatar Joel Einbinder Committed by Commit Bot

DevTools: Fix argument hints for static constructor methods

The constructor name was not being passed correctly into the JSON,
which was causing static methods to be incorrectly parsed as
unique top level functions.

Bug: 913363
Change-Id: If0a94184cceef0c16b8755fe375aad3e2e48de0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501495Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637852}
parent fa0e105d
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -178,7 +178,7 @@ function postProcess() { ...@@ -178,7 +178,7 @@ function postProcess() {
} else { } else {
for (const parent in methods[name]) { for (const parent in methods[name]) {
if (parent.endsWith('Constructor')) if (parent.endsWith('Constructor'))
functions.push({name, signatures: methods[name][parent], static: true, receiver: constructor}); functions.push({name, signatures: methods[name][parent], static: true, receiver: parent.substring(0, parent.length - 'Constructor'.length)});
else else
functions.push({name, signatures: methods[name][parent], receiver: parent}); functions.push({name, signatures: methods[name][parent], receiver: parent});
} }
......
...@@ -92,7 +92,6 @@ start,?deleteCount,...items ...@@ -92,7 +92,6 @@ start,?deleteCount,...items
URL.createObjectURL( URL.createObjectURL(
blob blob
source source
stream
(() => window)().URL["revokeObjectURL"]( (() => window)().URL["revokeObjectURL"](
url url
...@@ -103,4 +102,13 @@ null ...@@ -103,4 +102,13 @@ null
some gibberish $@#)(*^@# some gibberish $@#)(*^@#
null null
Date.parse(
s
JSON.parse(
text,?reviver
CSSNumericValue.parse(
cssText
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
await testHints('(() => window)().URL["revokeObjectURL"]('); await testHints('(() => window)().URL["revokeObjectURL"](');
await testHints('var notInAfunction'); await testHints('var notInAfunction');
await testHints('some gibberish $@#)(*^@#'); await testHints('some gibberish $@#)(*^@#');
await testHints('Date.parse(');
await testHints('JSON.parse(');
await testHints('CSSNumericValue.parse(');
TestRunner.completeTest(); TestRunner.completeTest();
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment