Remove unused jsfriendapi functions
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox83 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(14 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1668576 - Part 5: Remove unused ChromeCompartmentsOnly and ContentCompartmentsOnly. r=tcampbell!
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Comment 1•4 years ago
|
||
This was added in bug 1337537, but the only caller was removed in bug 1561715.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Added in bug 1360372, but no longer used.
Depends on D92072
Assignee | ||
Comment 3•4 years ago
|
||
Added in bug 1148188, but no longer used.
Depends on D92073
Assignee | ||
Comment 4•4 years ago
|
||
These were added in bug 1140399, but nowadays they're only used in
FUNCTION_VALUE_TO_JITINFO
. Inline them into FUNCTION_VALUE_TO_JITINFO
and
remove the rest.
Depends on D92075
Assignee | ||
Comment 5•4 years ago
|
||
ChromeCompartmentsOnly was added in bug 769273, but no longer used.
ContentCompartmentsOnly is even older, but also unused.
Depends on D92076
Assignee | ||
Comment 6•4 years ago
|
||
Added in bug 1067009, but no longer used.
Depends on D92077
Assignee | ||
Comment 7•4 years ago
|
||
The char*
overload for StringIsArrayIndex
is only used in test. Change
the test to use char16_t*
to avoid instantiating StringIsArrayIndexHelper
for char
.
Drive-by change:
- Avoid macro usage in the test.
Depends on D92078
Assignee | ||
Comment 8•4 years ago
|
||
Added in bug 1065452, but no longer used.
Depends on D92079
Assignee | ||
Comment 9•4 years ago
|
||
Added in 1024774, but no longer used.
Depends on D92080
Assignee | ||
Comment 10•4 years ago
|
||
Added in bug 911864, but today only used in JSObject.cpp.
Drive-by change:
- Remove unused PropertyCopyBehavior parameter.
Depends on D92081
Assignee | ||
Comment 11•4 years ago
|
||
Added in bug 1151679, but no longer used.
Depends on D92082
Assignee | ||
Comment 12•4 years ago
|
||
Added in bug 1428072, but no longer used.
Depends on D92083
Assignee | ||
Comment 13•4 years ago
|
||
Added in bug 1514672, but no longer used.
Depends on D92084
Assignee | ||
Comment 14•4 years ago
|
||
Those two aren't even defined anymore.
Depends on D92085
Comment 15•4 years ago
|
||
Thanks for doing this! We will kill off this terrible header.
(also hate you forever for bitrotting my parallel jsfriendapi.h
changes ❤️, fortunately I didn't have too many of them backed up)
Assignee | ||
Comment 16•4 years ago
|
||
Oh, I didn't know you already had more jsfriendapi.h
patches in the queue. My intention was to remove the unused functions, so you don't need to find new homes for them in bug 1663365.
Comment 17•4 years ago
•
|
||
Killing off this header seems great. The following removals seemed like things that maybe should be re-homed instead of removed, for hypothetical embedders to use.
GetScriptRealm
IsAtomsZone
StringIsArrayIndex
I don't have strong feelings about these, and we can remove if that really makes things easier.
Assignee | ||
Comment 18•4 years ago
|
||
I'd prefer to remove them for now and only if embedders give feedback these functions are actually needed outside of Gecko, we can add them back. For example I'm not sure StringIsArrayIndex
is the correct string-to-index function which should be exposed to embedders, because the ECMAScript spec generally uses ToIndex for string-to-index conversions, so it seems more useful to expose that one instead of the more restricted algorithm which only handles array indices.
Comment 19•4 years ago
|
||
I assure you, I will suck it up if I have to rebase around these changes. :-) Tho many of these I'd probably have stumbled across on my own, in the course of IWYUing individual symbols as they move around, I'd figure.
Comment 20•4 years ago
•
|
||
(Stack is fine to land as it is)
Assignee | ||
Comment 21•4 years ago
|
||
Okay, great. Thanks!
Comment 22•4 years ago
|
||
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aac79322b1b5 Part 1: Remove access validation hooks. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/f4a0181108a6 Part 2: Remove SystemZoneAvailable. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/8ad479fd4e12 Part 3: Remove ConvertArgsToArray. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/34926a02d3f1 Part 4: Remove GetFunctionObjectNative and inline FunctionObject{ToShadowFunction,IsNative}. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/3cc3204e5e72 Part 5: Remove unused ChromeCompartmentsOnly and ContentCompartmentsOnly. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/499feada2e1b Part 6: Remove RegExpToSharedNonInline. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/3579fdea91aa Part 7: Remove StringIsArrayIndex overload only used in tests. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/8fd014a4f415 Part 8: Remove GetPrototypeNoProxy. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/8c59310cf832 Part 9: Remove IsAtomsZone. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/178561d4ef74 Part 10: Remove JS_CopyPropertyFrom from jsfriendapi. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/4e866091d017 Part 11: Remove GetPropertyNameFromPC. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/a152caf9c38e Part 12: Remove GetScriptRealm. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/bfd2fcda10b3 Part 13: Remove AssertCompartmentHasSingleRealm. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/5d4bc61277e1 Part 14: Remove ObjectClassName and InitScriptSourceElement. r=tcampbell
Comment 23•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aac79322b1b5
https://hg.mozilla.org/mozilla-central/rev/f4a0181108a6
https://hg.mozilla.org/mozilla-central/rev/8ad479fd4e12
https://hg.mozilla.org/mozilla-central/rev/34926a02d3f1
https://hg.mozilla.org/mozilla-central/rev/3cc3204e5e72
https://hg.mozilla.org/mozilla-central/rev/499feada2e1b
https://hg.mozilla.org/mozilla-central/rev/3579fdea91aa
https://hg.mozilla.org/mozilla-central/rev/8fd014a4f415
https://hg.mozilla.org/mozilla-central/rev/8c59310cf832
https://hg.mozilla.org/mozilla-central/rev/178561d4ef74
https://hg.mozilla.org/mozilla-central/rev/4e866091d017
https://hg.mozilla.org/mozilla-central/rev/a152caf9c38e
https://hg.mozilla.org/mozilla-central/rev/bfd2fcda10b3
https://hg.mozilla.org/mozilla-central/rev/5d4bc61277e1
Description
•