mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
0ac7bf29af
Summary: Runtime and Debugger agents are shipped with JSC so we reuse them. Messages are routed to them through the `LegacyDispatcher` which also handles translating their events. The Page agent emits the `Page.getResourceTree` method that the Chrome inspector expects. Reviewed By: michalgr Differential Revision: D4021499 fbshipit-source-id: a93d0add01cee732401f8e8db1d43205bfbd4cd4
35 lines
902 B
C++
35 lines
902 B
C++
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
#include "LegacyInspectorEnvironment.h"
|
|
|
|
#include <JavaScriptCore/config.h>
|
|
#include <JavaScriptCore/Completion.h>
|
|
#include <JavaScriptCore/JSGlobalObject.h>
|
|
#include <JavaScriptCore/InjectedScriptManager.h>
|
|
#include <JavaScriptCore/InjectedScriptHost.h>
|
|
|
|
#include <folly/Memory.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
using namespace Inspector;
|
|
|
|
LegacyInspectorEnvironment::LegacyInspectorEnvironment()
|
|
: injectedScriptManager_(folly::make_unique<InjectedScriptManager>(*this, InjectedScriptHost::create())) {}
|
|
|
|
LegacyInspectorEnvironment::~LegacyInspectorEnvironment() {
|
|
injectedScriptManager_->disconnect();
|
|
}
|
|
|
|
InspectorFunctionCallHandler LegacyInspectorEnvironment::functionCallHandler() const {
|
|
return JSC::call;
|
|
}
|
|
|
|
InspectorEvaluateHandler LegacyInspectorEnvironment::evaluateHandler() const {
|
|
return JSC::evaluate;
|
|
}
|
|
|
|
}
|
|
}
|