Remove jsapi.h from all but two headers in js/src
Categories
(Core :: JavaScript Engine, task)
Tracking
()
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 |
Assignee | ||
Comment 1•3 years ago
|
||
Adds a new public header for any stack related functionality. This includes
JS stack as well as native stack related functions.
Assignee | ||
Comment 2•3 years ago
|
||
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
Assignee | ||
Comment 4•3 years ago
|
||
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
Assignee | ||
Comment 5•3 years ago
|
||
Not related to the functions in "js/public/Stream.h" and therefore get's a
separate header file.
Depends on D123195
Assignee | ||
Comment 6•3 years ago
|
||
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
Assignee | ||
Comment 7•3 years ago
|
||
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
Assignee | ||
Comment 8•3 years ago
|
||
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
Assignee | ||
Comment 9•3 years ago
|
||
Remove jsapi.h include from vm/Runtime.h and then fix any missing includes in
other files.
Depends on D123199
Assignee | ||
Comment 11•3 years ago
|
||
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
Assignee | ||
Comment 12•3 years ago
|
||
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
Assignee | ||
Comment 15•3 years ago
|
||
Remove jsapi.h include from vm/GlobalObject.h and then fix any missing includes
in other files.
Depends on D123205
Assignee | ||
Comment 16•3 years ago
|
||
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
Assignee | ||
Comment 17•3 years ago
|
||
And then fix any missing includes in other files.
Depends on D123207
Assignee | ||
Comment 18•3 years ago
|
||
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
Assignee | ||
Comment 19•3 years ago
|
||
These includes are no longer needed after the previous patches.
Depends on D123209
Comment 20•3 years ago
|
||
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
Comment 21•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a758433dc3cd
https://hg.mozilla.org/mozilla-central/rev/67f53f5aedff
https://hg.mozilla.org/mozilla-central/rev/1f4828c9c2c9
https://hg.mozilla.org/mozilla-central/rev/5a369a81890f
https://hg.mozilla.org/mozilla-central/rev/5bb913fbf8bd
https://hg.mozilla.org/mozilla-central/rev/b2689f96728a
https://hg.mozilla.org/mozilla-central/rev/8a14435cfbdc
https://hg.mozilla.org/mozilla-central/rev/7e57757003c1
https://hg.mozilla.org/mozilla-central/rev/ad5afe9bb976
https://hg.mozilla.org/mozilla-central/rev/53f3c8b6529e
https://hg.mozilla.org/mozilla-central/rev/25a16c85588d
https://hg.mozilla.org/mozilla-central/rev/db658f343cfb
https://hg.mozilla.org/mozilla-central/rev/0b8f97ff63c4
https://hg.mozilla.org/mozilla-central/rev/d70a75fd6462
https://hg.mozilla.org/mozilla-central/rev/b1c14abc1153
https://hg.mozilla.org/mozilla-central/rev/8bc5e61d9aa6
https://hg.mozilla.org/mozilla-central/rev/cf8c331e6527
https://hg.mozilla.org/mozilla-central/rev/e9840139ea64
https://hg.mozilla.org/mozilla-central/rev/01fc3504c984
Description
•