[go: up one dir, main page]

Page MenuHomePhabricator

WIP: Bug 2069963 - Expose the marker emitter configuration operations to JS.
Changes PlannedPublicDraft

Authored by dcarver on Sat, Sep 26, 8:27 AM.
Referenced Files
F84352370: D329395.1792199812.diff
Fri, Oct 16, 1:16 AM
Unknown Object (File)
Mon, Oct 12, 9:26 AM
Unknown Object (File)
Fri, Oct 9, 11:16 AM
Unknown Object (File)
Fri, Oct 9, 11:15 AM
Unknown Object (File)
Thu, Oct 8, 10:09 PM
Unknown Object (File)
Thu, Oct 8, 10:09 PM
Unknown Object (File)
Wed, Oct 7, 7:23 AM
Unknown Object (File)
Wed, Oct 7, 7:23 AM
Subscribers
None

Details

Reviewers
None
Bugzilla Bug ID
2069963
Merge Conflict Status
Landing may fail: this does not merge cleanly into the target branch
Conflicts when merged against target branch tip d57263ce449b, starting from 34ed69f16167, with 9 parent revision(s) applied first.
Last checked Fri, Oct 16, 11:34 AM
Diff 1389937, based on 34ed69f16167
Summary

matchMarkerEmitterNames(), resolveMarkerEmitters() and
appendMarkerEmitterDirectivesToConfig(), on ChromeUtils next to
getOrCreateProfilerMarkerEmitter(), so that about:profiling can filter,
display and edit a configuration without a second implementation of the
grammar. There are two of it already, in C++ and in Java, and that is one
more than anybody wants to keep honest.

They are pure. Nothing here touches an emitter, the registry or the
profiler's state, so they work before anything has ever been recorded --
which matters, because the list of emitters starts empty and the
configuration still has to be editable -- and they are cheap enough to call
on every keystroke.

None of them throws. A text that cannot be read comes back as error, and
the useful part of it is position: the offset is what lets a UI point at
the mistake rather than describe it, and an exception would have to drop it.
That also suits functions called while somebody is typing, where a malformed
intermediate state is normal rather than exceptional.

Appending takes a batch, which makes a bulk edit atomic: one parse of the
configuration, and a mistake anywhere appends none of it, the same
whole-or-nothing rule the configuration itself follows. Escaping stays in
ToString(); no caller assembles a directive by hand, so no caller can get it
wrong.

MarkerEmitterAction spells the sigils out. WebIDL turns every
non-alphanumeric character of an enum value into _, so "+", "-" and "~"
would all have collided.

Diff Detail

Repository
rFIREFOXAUTOLAND firefox-autoland
Branch
HEAD