diff --git a/ReactCommon/hermes/inspector/chrome/Connection.cpp b/ReactCommon/hermes/inspector/chrome/Connection.cpp index 354eede529c..68d1f30b72d 100644 --- a/ReactCommon/hermes/inspector/chrome/Connection.cpp +++ b/ReactCommon/hermes/inspector/chrome/Connection.cpp @@ -88,7 +88,6 @@ class Connection::Impl : public inspector::InspectorObserver, const m::heapProfiler::StopTrackingHeapObjectsRequest &req) override; void handle(const m::runtime::EvaluateRequest &req) override; void handle(const m::runtime::GetPropertiesRequest &req) override; - void handle(const m::hermes::SetPauseOnLoadRequest &req) override; private: std::vector makePropsFromScope( @@ -761,21 +760,6 @@ void Connection::Impl::handle(const m::runtime::GetPropertiesRequest &req) { .thenError(sendErrorToClient(req.id)); } -void Connection::Impl::handle(const m::hermes::SetPauseOnLoadRequest &req) { - PauseOnLoadMode mode; - if (req.state == "none") { - mode = PauseOnLoadMode::None; - } else if (req.state == "all") { - mode = PauseOnLoadMode::All; - } else if (req.state == "smart") { - mode = PauseOnLoadMode::Smart; - } else { - sendErrorToClientViaExecutor(req.id, "Unrecognized pause on load mode"); - return; - } - sendResponseToClientViaExecutor(inspector_->setPauseOnLoads(mode), req.id); -} - /* * Send-to-client methods */ diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp index 18ce5ac65a6..ae0f77851a1 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.cpp @@ -1,5 +1,5 @@ // Copyright 2004-present Facebook. All Rights Reserved. -// @generated SignedSource<<0d7691362d081e7bc44d2b7a0ed24371>> +// @generated SignedSource<<4ab81efd6f767bd583d00c806b7d1d9b>> #include "MessageTypes.h" @@ -46,7 +46,6 @@ std::unique_ptr Request::fromJsonThrowOnError(const std::string &str) { makeUnique}, {"HeapProfiler.takeHeapSnapshot", makeUnique}, - {"Hermes.setPauseOnLoad", makeUnique}, {"Runtime.evaluate", makeUnique}, {"Runtime.getProperties", makeUnique}, }; @@ -683,33 +682,6 @@ void heapProfiler::TakeHeapSnapshotRequest::accept( handler.handle(*this); } -hermes::SetPauseOnLoadRequest::SetPauseOnLoadRequest() - : Request("Hermes.setPauseOnLoad") {} - -hermes::SetPauseOnLoadRequest::SetPauseOnLoadRequest(const dynamic &obj) - : Request("Hermes.setPauseOnLoad") { - assign(id, obj, "id"); - assign(method, obj, "method"); - - dynamic params = obj.at("params"); - assign(state, params, "state"); -} - -dynamic hermes::SetPauseOnLoadRequest::toDynamic() const { - dynamic params = dynamic::object; - put(params, "state", state); - - dynamic obj = dynamic::object; - put(obj, "id", id); - put(obj, "method", method); - put(obj, "params", std::move(params)); - return obj; -} - -void hermes::SetPauseOnLoadRequest::accept(RequestHandler &handler) const { - handler.handle(*this); -} - runtime::EvaluateRequest::EvaluateRequest() : Request("Runtime.evaluate") {} runtime::EvaluateRequest::EvaluateRequest(const dynamic &obj) diff --git a/ReactCommon/hermes/inspector/chrome/MessageTypes.h b/ReactCommon/hermes/inspector/chrome/MessageTypes.h index 3d7222fd6ac..503b486743c 100644 --- a/ReactCommon/hermes/inspector/chrome/MessageTypes.h +++ b/ReactCommon/hermes/inspector/chrome/MessageTypes.h @@ -1,5 +1,5 @@ // Copyright 2004-present Facebook. All Rights Reserved. -// @generated SignedSource<<08b66e22784e225b926d36131b9a7693>> +// @generated SignedSource<<0a1a011902fd18d4eebd2fe12fafb8b1>> #pragma once @@ -73,10 +73,6 @@ struct StopTrackingHeapObjectsRequest; struct TakeHeapSnapshotRequest; } // namespace heapProfiler -namespace hermes { -struct SetPauseOnLoadRequest; -} // namespace hermes - /// RequestHandler handles requests via the visitor pattern. struct RequestHandler { virtual ~RequestHandler() = default; @@ -99,7 +95,6 @@ struct RequestHandler { virtual void handle( const heapProfiler::StopTrackingHeapObjectsRequest &req) = 0; virtual void handle(const heapProfiler::TakeHeapSnapshotRequest &req) = 0; - virtual void handle(const hermes::SetPauseOnLoadRequest &req) = 0; virtual void handle(const runtime::EvaluateRequest &req) = 0; virtual void handle(const runtime::GetPropertiesRequest &req) = 0; }; @@ -124,7 +119,6 @@ struct NoopRequestHandler : public RequestHandler { void handle( const heapProfiler::StopTrackingHeapObjectsRequest &req) override {} void handle(const heapProfiler::TakeHeapSnapshotRequest &req) override {} - void handle(const hermes::SetPauseOnLoadRequest &req) override {} void handle(const runtime::EvaluateRequest &req) override {} void handle(const runtime::GetPropertiesRequest &req) override {} }; @@ -417,16 +411,6 @@ struct heapProfiler::TakeHeapSnapshotRequest : public Request { folly::Optional treatGlobalObjectsAsRoots; }; -struct hermes::SetPauseOnLoadRequest : public Request { - SetPauseOnLoadRequest(); - explicit SetPauseOnLoadRequest(const folly::dynamic &obj); - - folly::dynamic toDynamic() const override; - void accept(RequestHandler &handler) const override; - - std::string state; -}; - struct runtime::EvaluateRequest : public Request { EvaluateRequest(); explicit EvaluateRequest(const folly::dynamic &obj); diff --git a/ReactCommon/hermes/inspector/tools/message_types.txt b/ReactCommon/hermes/inspector/tools/message_types.txt index 6d02ed4e754..420fdad15d6 100644 --- a/ReactCommon/hermes/inspector/tools/message_types.txt +++ b/ReactCommon/hermes/inspector/tools/message_types.txt @@ -23,4 +23,3 @@ Runtime.consoleAPICalled Runtime.evaluate Runtime.executionContextCreated Runtime.getProperties -Hermes.setPauseOnLoad