Don't fire onNativeCall when the current script is self hosted
Categories
(Core :: JavaScript Engine, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: bhackett1024, Assigned: bhackett1024)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
The debugger's onNativeCall hook fires when either a C++ native or a self-hosted function is called from script, so that users of this API don't need to care about whether a builtin function is implemented in JS or C++. This leads, however, to any calls within the self-hosted function to other self-hosted functions or to C++ natives (which will generally be an intrinsic only for use in self hosted code) will also be treated as native calls and fire the hook. This means that callers using the onNativeCall hook have to deal with a lot of functions they don't have any understanding of.
My original plan for dealing with this (bug 1576776 comment 8) was to require the devtools to use a whitelist of these internal methods, but this is pretty unsatisfactory. Looking again, it should be straightforward to avoid firing the onNativeCall hook when these internal methods are called: if the topmost script on the stack is self hosted, don't fire the onNativeCall hook. Making this change to the semantics will make it a lot easier to use this hook for supporting eager evaluation (bug 1460518).
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b3d4e8c45af2 Don't fire onNativeCall when the current script is self hosted, r=loganfsmyth.
Comment 3•4 years ago
•
|
||
Backed out changeset b3d4e8c45af2 (Bug 1607596) for causing bustages in Object-isSameNative.js CLOSED TREE
Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=284184023&resultStatus=testfailed%2Cbusted%2Cexception&revision=b3d4e8c45af2d06115fb57978a2d3a5db876448b
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=284184023&repo=autoland&lineNumber=26149
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=284183981&repo=autoland&lineNumber=10937
Backout: https://hg.mozilla.org/integration/autoland/rev/554e0349fddd7b7a763b708605cd4a72f82a106c
Pushed by bhackett@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f35a1ad5b492 Don't fire onNativeCall when the current script is self hosted, r=loganfsmyth.
Comment 5•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Description
•