Closed Bug 1726737 Opened 28 days ago Closed 27 days ago

Remove jsapi.h from all but two headers in js/src

Categories

(Core :: JavaScript Engine, task)

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: anba, Assigned: anba)

References

(Blocks 1 open bug)

Details

Attachments

(19 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.

Adds a new public header for any stack related functionality. This includes
JS stack as well as native stack related functions.

JSSourceElementCallback is only used by SetSourceElementCallback, which in
turn is defined in "CompilationAndEvaluation.h", therefore move the callback
definition into the same file, too.

Depends on D123192

This keeps JSErrorInterceptor as a public JSAPI function, even though it is
only of limited use, because it only has an effect when NIGHTLY_BUILD is
defined.

Depends on D123194

Not related to the functions in "js/public/Stream.h" and therefore get's a
separate header file.

Depends on D123195

Neither "js/public/MemoryFunctions.h" nor "js/public/AllocPolicy.h" seemed like
the perfect place where these two functions should be placed, therefore we just
create a new header file for them.

Depends on D123196

Adds a separate header for wrapper callbacks in case we also want to move
the "jsfriendapi.h" wrapper callbacks (SetPreserveWrapperCallbacks) to this
header file.

Depends on D123197

Similar to the two previous patches in this stack, add a separate header file
for these callback functions. The header file name matches the file name of the
other two files (i.e. ends with "Callbacks" and not "Callback"), even though
the function name is SetWaitCallback.

Depends on D123198

Remove jsapi.h include from vm/Runtime.h and then fix any missing includes in
other files.

Depends on D123199

Remove jsapi.h include from vm/JSContext.h and then fix any missing includes in
other files.

The include was only just added in part 9, but with part 10, we can remove it
again.

Depends on D123201

Uses "TelemetryTimers.h" as the file name instead of just "Timers.h", so it's
more easy to see that this functionality isn't related to WindowTimers or other
date-time related things.

Depends on D123202

No transitive include fixups needed for once.

Depends on D123203

Remove jsapi.h include from vm/GlobalObject.h and then fix any missing includes
in other files.

Depends on D123205

Moves JS_DefineDebuggerObject into "js/Debug.h", which allows to remove the
"jsapi.h" include in "debugger/Debugger.h". And then add the missing "jsapi.h"
include in "debugger/DebuggerMemory.cpp".

Depends on D123206

And then fix any missing includes in other files.

Depends on D123207

Except for the following two files, no other header file is still including
"jsapi.h". Add a rule to "check_spidermonkey_style.py" to make sure we don't
regress this progress.

Exceptions:

  • "vm/Compartment-inl.h" still needs to include "jsapi.h" for JS::InformalValueTypeName().
  • "jsapi-tests/tests.h" still needs to include "jsapi.h" for JS_ValueToSource().

Depends on D123208

These includes are no longer needed after the previous patches.

Depends on D123209

Pushed by andre.bargull@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a758433dc3cd
Part 1: Add public header for stack operations. r=arai
https://hg.mozilla.org/integration/autoland/rev/67f53f5aedff
Part 2: Move JSSourceElementCallback into CompilationAndEvaluation. r=arai
https://hg.mozilla.org/integration/autoland/rev/1f4828c9c2c9
Part 3: Add public header for ScriptPrivate functions. r=arai
https://hg.mozilla.org/integration/autoland/rev/5a369a81890f
Part 4: Add public header for JSErrorInterceptor. r=arai
https://hg.mozilla.org/integration/autoland/rev/5bb913fbf8bd
Part 5: Add public header for JS::StreamConsumer. r=arai
https://hg.mozilla.org/integration/autoland/rev/b2689f96728a
Part 6: Add public header for out-of-memory callbacks. r=arai
https://hg.mozilla.org/integration/autoland/rev/8a14435cfbdc
Part 7: Add public header for wrapper callbacks. r=arai
https://hg.mozilla.org/integration/autoland/rev/7e57757003c1
Part 8: Add public header for wait callbacks. r=arai
https://hg.mozilla.org/integration/autoland/rev/ad5afe9bb976
Part 9: Remove jsapi.h include from vm/Runtime.h. r=arai
https://hg.mozilla.org/integration/autoland/rev/53f3c8b6529e
Part 10: Add public header for interrupt functions. r=arai
https://hg.mozilla.org/integration/autoland/rev/25a16c85588d
Part 11: Remove jsapi.h include from vm/JSContext.h. r=arai
https://hg.mozilla.org/integration/autoland/rev/db658f343cfb
Part 12: Add public header for telemetry timers. r=arai
https://hg.mozilla.org/integration/autoland/rev/0b8f97ff63c4
Part 13: Remove jsapi.h include from vm/Realm.h. r=arai
https://hg.mozilla.org/integration/autoland/rev/d70a75fd6462
Part 14: Add public header for global object functions. r=arai
https://hg.mozilla.org/integration/autoland/rev/b1c14abc1153
Part 15: Remove jsapi.h include from vm/GlobalObject.h. r=arai
https://hg.mozilla.org/integration/autoland/rev/8bc5e61d9aa6
Part 16: Move JS_DefineDebuggerObject into js/Debug.h. r=arai
https://hg.mozilla.org/integration/autoland/rev/cf8c331e6527
Part 17: Remove unnecessary includes to jsapi in headers. r=arai
https://hg.mozilla.org/integration/autoland/rev/e9840139ea64
Part 18: Disallow including jsapi.h from header files. r=arai
https://hg.mozilla.org/integration/autoland/rev/01fc3504c984
Part 19: Remove no longer needed jsapi.h includes. r=arai
You need to log in before you can comment on or make changes to this bug.