  Some fast radio bursts (FRBs) are expected to be associated with the
afterglow emission of gamma-ray bursts (GRBs), while a short-lived,
supermassive neutron star (NS) forms during the GRBs. I investigate the
possible contributions to the dispersion measure (DM) of the FRBs from the GRB
ejecta and the wind blown from the precollapsing NS. On the one hand, sometimes
an internal X-ray plateau afterglow could be produced by the NS wind, which
indicates that a great number of electron-positron pairs are carried by the
wind. If the pair-generation radius satisfies a somewhat rigorous condition,
the relativistic and dense wind would contribute a high DM to the associated
FRB, which can be comparable to and even exceed the DM contributed by the
intergalactic medium. On the other hand, if the wind only carries a
Goldreich-Julian particle flux, its DM contribution would become negligible;
meanwhile, the internal plateau afterglow would not appear. Alternatively, the
FRB should be associated with a GRB afterglow produced by the GRB external
shock, i.e., an energy-injection-caused shallow-decay afterglow or a normal
single-power-law afterglow if the impulsive energy release of the GRB is high
enough. In the latter case, the DM contributed by the high-mass GRB ejecta
could be substantially important, in particular, for an environment of
main-sequence stellar wind. In summary, a careful assessment on the various DM
contributors could be required for the cosmological application of the expected
FRB-GRB association. The future DM measurements of GRB-associated FRBs could
provide a constraint on the physics of NS winds.
