Closed Bug 1610833 Opened 6 years ago Closed 7 months ago

Autocomplete fails after `/(`

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox137 fixed)

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: nchevobbe, Assigned: cpplearner, NeedInfo)

Details

Attachments

(1 file, 1 obsolete file)

Steps to reproduce

  1. Open the console
  2. Type 1/(d

Expected results

The autocomplete popup should be displayed, containing document

Actual results

The autocomplete popup isn't displayed.

hi 👋 ,
I look into it and found that if you type /( https://searchfox.org/mozilla-central/source/devtools/client/webconsole/actions/autocomplete.js#145) this will do autocomplete for '(' and filled in the with matches = [] instead of matches = null which inturn fills cache(https://searchfox.org/mozilla-central/source/devtools/client/webconsole/reducers/autocomplete.js#50), so if after that you write anything (https://searchfox.org/mozilla-central/source/devtools/client/webconsole/actions/autocomplete.js#145) this is called as cache is empty we don't get any result, I cannot find the implementation of autocomplete method used here(https://searchfox.org/mozilla-central/source/devtools/client/webconsole/actions/autocomplete.js#145) can you point me into it so I could investigate further

Thanx
Pranav

hello Pranav, thanks for investigating.

I don't think the issue is on the client side.
If you apply the following diff:

diff --git a/devtools/shared/webconsole/test/xpcshell/test_js_property_provider.js b/devtools/shared/webconsole/test/xpcshell/test_js_property_provider.js
--- a/devtools/shared/webconsole/test/xpcshell/test_js_property_provider.js
+++ b/devtools/shared/webconsole/test/xpcshell/test_js_property_provider.js
@@ -594,6 +594,9 @@ function runChecks(dbgObject, environmen
   });
   test_has_result(results, "'propA'");
   Assert.equal(results.matches.has("propLocal"), false);
+
+  results = propertyProvider("1/(t");
+  test_has_result(results, "testObject");
 }

and run the test, it will fail.
This means there's an issue with JsPropertyProvider analyzeInputString (devtools/shared/webconsole/js-property-provider.js#412 )

The culprit is probably here https://searchfox.org/mozilla-central/rev/ad6234148892bc29bf08d736604ac71925138040/devtools/shared/webconsole/js-property-provider.js#544-547, where we reset the statement, but really should go other the normal case.

I'd like to work on this!

Thanks Miguel, it's yours :)
Let me know if you have any question

Assignee: nobody → mroncancio19
Status: NEW → ASSIGNED

The bug assignee didn't login in Bugzilla in the last 7 months.
:nchevobbe, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: mroncancio19 → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(nchevobbe)
Flags: needinfo?(nchevobbe)
Severity: normal → S3
Assignee: nobody → cpplearner
Status: NEW → ASSIGNED
Attachment #9463676 - Attachment is obsolete: true
Attachment #9463677 - Attachment description: Bug 1610833 - Autocomplete fails after `/(` r=#devtools-reviewers → Bug 1610833 - Fix console autocomplete after `/(` . r=#devtools-reviewers
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/da119eca293c Fix console autocomplete after `/(` . r=devtools-reviewers,nchevobbe
Attachment #9463677 - Attachment description: Bug 1610833 - Fix console autocomplete after `/(` . r=#devtools-reviewers → Bug 1610833 - Autocomplete fails after `/(` r=#devtools-reviewers
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: