Closed Bug 1501129 Opened 10 months ago Closed 10 months ago

Searching for JSContext::enqueuePromiseJobCallback gives extraneous results


(Webtools :: Searchfox, defect)

Not set


(firefox65 fixed)

Tracking Status
firefox65 --- fixed


(Reporter: jimb, Assigned: kats)



(3 files)

When searching mozilla-central fcfb479e, right-clicking on the definition of the field `JSContext::enqueuePromiseJobCallback` (at js/src/vm/JSContext.h:918) and choosing 'Search for field JSContext::enqueuePromiseJobCallback' gives me results including the unrelated fields 'JSContext::getIncumbentGlobalCallback' and 'JSContext::enqueuePromiseJobCallbackData'.
Attached image screenshot-field.png
Screenshot showing what I'm clicking on.
Attached image field-results.png
Results of the search described above.
Note that the search field contains:


If I edit that to read, instead:


then I get the right search results.
Everything after the ifdef at suffers from the same problem. Looks like the field symbols are numbered differently on Linux vs Mac but then get merged.
If we change the getFieldIndex() at [1] to something that's more stable in the face of ifdefs, such as the mangled location, that should fix this.

Assignee: nobody → kats
In the symbol for field decls was changed from `return std::string("F_") + decl->getQualifiedNameAsString();` to `return std::string("F_<") + GetMangledName(ctx, record) + ">_" + ToString(d2->getFieldIndex());` and it's not really clear why. Using the name instead of the index seems fine to me, and should avoid this problem. Using the name is superior to using the location because it should also handle cases like this:

#ifdef MACOSX
  MacType var = new MacType();
  LinuxType var = new LinuxType();

because in this case we want `var` to match both the declarations although they would have different locations and the same name.
Pushed by
Use field names instead of their index when mangling. r=mccr8
Closed: 10 months ago
Resolution: --- → FIXED
This is deployed now.
You need to log in before you can comment on or make changes to this bug.