Closed Bug 1668576 Opened 4 years ago Closed 4 years ago

Remove unused jsfriendapi functions

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
83 Branch
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
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
No description provided.

This was added in bug 1337537, but the only caller was removed in bug 1561715.

Severity: -- → N/A
Priority: -- → P1

Added in bug 1360372, but no longer used.

Depends on D92072

Added in bug 1148188, but no longer used.

Depends on D92073

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

ChromeCompartmentsOnly was added in bug 769273, but no longer used.
ContentCompartmentsOnly is even older, but also unused.

Depends on D92076

Added in bug 1067009, but no longer used.

Depends on D92077

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

Added in bug 1065452, but no longer used.

Depends on D92079

Added in 1024774, but no longer used.

Depends on D92080

Added in bug 911864, but today only used in JSObject.cpp.

Drive-by change:

  • Remove unused PropertyCopyBehavior parameter.

Depends on D92081

Added in bug 1151679, but no longer used.

Depends on D92082

Added in bug 1428072, but no longer used.

Depends on D92083

Added in bug 1514672, but no longer used.

Depends on D92084

Those two aren't even defined anymore.

Depends on D92085

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)

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.

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.

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.

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.

(Stack is fine to land as it is)

Okay, great. Thanks!

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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: