Closed Bug 1589415 Opened 5 years ago Closed 5 years ago

Some minor string-related cleanups

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: jandem, Assigned: jandem)

Details

Attachments

(4 files)

Some random cleanup patches for things I noticed while doing a tree-wide audit for bug 1330776.

Priority: -- → P2

Use HashStringChars instead of hand-rolling custom string hashing code.

Depends on D49713

It's tempting to use CopyChars also in AppendString, but that one has a
char() cast for each character. Maybe we should change that but I didn't
want to introduce any side-effects.

Depends on D49714

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0b3dfc56b00a
part 1 - Use StringEqualsAscii in intrinsic_IsRuntimeDefaultLocale. r=anba
https://hg.mozilla.org/integration/autoland/rev/d24071361543
part 2 - Add js::HashStringChars and use it in a few places. r=anba
https://hg.mozilla.org/integration/autoland/rev/32594c80b563
part 3 - Simplify CTypes FieldHashPolicy. r=anba
https://hg.mozilla.org/integration/autoland/rev/e3048efebdeb
part 4 - Use CopyChars to simplify CTypes PrependString. r=anba
You need to log in before you can comment on or make changes to this bug.