Skip to content

Commit e739c2f

Browse files
hoxyqmeta-codesync[bot]
authored andcommitted
jsinspector: refactor domain notifications implementation (facebook#54244)
Summary: Pull Request resolved: facebook#54244 # Changelog: [Internal] Refactors the logic a bit. We will use `Runtime` domain as a signal for installation of `console.createTask()` implementation. Differential Revision: D85274860
1 parent 600a8dc commit e739c2f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/react-native/ReactCommon/jsinspector-modern/RuntimeTarget.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,22 @@ class JSINSPECTOR_EXPORT RuntimeTarget : public EnableExecutorFromThis<RuntimeTa
331331
*/
332332
void notifyDomainStateChanged(Domain domain, bool enabled, const RuntimeAgent &notifyingAgent);
333333

334+
/**
335+
* Processes the changes to the state of a given domain.
336+
*
337+
* Returns a pair of booleans:
338+
* 1. Returns true, if an only if the given domain state changed locally,
339+
* for a given session.
340+
* 2. Returns true, if and only if the given domain state changed globally:
341+
* when the given Agent is the only Agent that enabled given domain across
342+
* sessions, or when the only Agent that had this domain enabled has
343+
* disconnected.
344+
*/
345+
std::pair<bool, bool> processDomainChange(
346+
Domain domain,
347+
bool enabled,
348+
const RuntimeAgent& notifyingAgent);
349+
334350
/**
335351
* Processes the changes to the state of a given domain.
336352
*

0 commit comments

Comments
 (0)