| Summary: | Pass JSToken by const reference | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jonathan Bedard <jbedard> | ||||
| Component: | JavaScriptCore | Assignee: | Jonathan Bedard <jbedard> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, saam, simon.fraser, tzagallo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Jonathan Bedard
2020-01-15 15:42:52 PST
Created attachment 387859 [details]
Patch
Comment on attachment 387859 [details]
Patch
This call site concerns me since m_token is a field that's updated as we parse more things
pattern = createBindingPattern(context, kind, exportType, *m_token.m_data.ident, m_token, bindingContext, duplicateIdentifier);
Comment on attachment 387859 [details]
Patch
Actually it looks like this function doesn’t lex, so we’re ok. Passing it by reference is ok since m_token won’t be updated
Can you verify also that it doesn’t end up lexing?
r=me
(In reply to Saam Barati from comment #3) > Comment on attachment 387859 [details] > Patch > > Actually it looks like this function doesn’t lex, so we’re ok. Passing it by > reference is ok since m_token won’t be updated > > Can you verify also that it doesn’t end up lexing? > > r=me It does not lex. And reading through what the function is doing, seems like it shouldn't be lexing in the future either, although this change would sort of force that on us. Comment on attachment 387859 [details] Patch Clearing flags on attachment: 387859 Committed r254689: <https://trac.webkit.org/changeset/254689> All reviewed patches have been landed. Closing bug. |