-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create HermesRuntimeAgent #42747
Create HermesRuntimeAgent #42747
Conversation
This pull request was exported from Phabricator. Differential Revision: D51234333 |
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Pull Request resolved: facebook#42747 Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. Differential Revision: D51234333 fbshipit-source-id: bdf4087e3ae85700b59e9c7b4e206b517cec64e9
cc7fe8d
to
8721123
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Pull Request resolved: facebook#42747 Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. Reviewed By: huntie Differential Revision: D51234333 fbshipit-source-id: 49a293d625137f78dfcb99b3e75331135dd3db16
8721123
to
4d09853
Compare
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. Reviewed By: huntie Differential Revision: D51234333
4d09853
to
8a19709
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
8a19709
to
ca995c8
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
ca995c8
to
30b36f7
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
30b36f7
to
857d3ba
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
857d3ba
to
d6554c6
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Base commit: 069c244 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
d6554c6
to
7708be0
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
7708be0
to
065f560
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
065f560
to
83836c0
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
83836c0
to
55fa572
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
Summary: Changelog: [Internal] Implements a `RuntimeAgent` (D51231326) for Hermes for the modern CDP backend, based on the `CDPHandler` API that Hermes exposes currently. ## A note on `console` We unfortunately have to disable `console` interception (D51234334 / equivalently D52971652) because `CDPHandler`'s current implementation is not aligned with the Agent concept: * Agents are only created once a session has started, but the `console` interceptor needs to be injected at VM startup. * Agents should not clobber each other's shared state (nor consume excessive resources per Agent), but each `CDPHandler` would install its own independent `console` interceptor if enabled. We will enable CDP `console` support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes. ## Conditional compilation based on `HERMES_ENABLE_DEBUGGER` `HermesRuntimeAgent.cpp` compiles both with and without `-DHERMES_ENABLE_DEBUGGER`, which is the flag Hermes uses to control the availability of `CDPHandler` (and its containing Buck library). If the debugger is not enabled, `HermesRuntimeAgent` reduces to a `FallbackRuntimeAgent`. In either case, no Hermes debugger headers leak into `HermesRuntimeAgent.h`, so callers don't need to check `#ifdef HERMES_ENABLE_DEBUGGER`, and the overall CDP backend infra is not gated on whether the Hermes debugger is compiled in. Reviewed By: huntie Differential Revision: D51234333
55fa572
to
ea1273b
Compare
This pull request was exported from Phabricator. Differential Revision: D51234333 |
This pull request has been merged in cc34ace. |
Summary:
Changelog: [Internal]
Implements a
RuntimeAgent
(D51231326) for Hermes for the modern CDP backend, based on theCDPHandler
API that Hermes exposes currently.A note on
console
We unfortunately have to disable
console
interception (D51234334 / equivalently D52971652) becauseCDPHandler
's current implementation is not aligned with the Agent concept:console
interceptor needs to be injected at VM startup.CDPHandler
would install its own independentconsole
interceptor if enabled.We will enable CDP
console
support in the modern backend in future work. This will require either some additional plumbing in RN (e.g. to safely access JSI from an Agent/Target) or some additional work in Hermes.Differential Revision: D51234333