Skip to content

Commit

Permalink
fix(devtools): fix the name of function
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyunong committed Nov 15, 2024
1 parent 58a40b0 commit f69d299
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class DevToolsUtil {
static bool ShouldAvoidPostDomManagerTask(const std::string& event_name);

private:
static hippy::dom::DomArgument makeLocationArgument(double x, double y);
static hippy::dom::DomArgument MakeLocationArgument(double x, double y);
static std::shared_ptr<DomNode> GetHitNode(const std::shared_ptr<RootNode>& root_node, double x, double y);
static std::string ParseNodeKeyProps(const std::string& node_key, const NodePropsUnorderedMap& node_props);
static std::string ParseNodeProps(const NodePropsUnorderedMap& node_props);
Expand Down
8 changes: 4 additions & 4 deletions devtools/devtools-integration/native/src/devtools_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ auto MakeCopyable(F&& f) {
};
}

hippy::dom::DomArgument DevToolsUtil::makeLocationArgument(double x, double y) {
hippy::dom::DomArgument DevToolsUtil::MakeLocationArgument(double x, double y) {
footstone::value::HippyValue::HippyValueObjectType hippy_value_object;
hippy_value_object[kXOnScreen] = footstone::value::HippyValue(x);
hippy_value_object[kYOnScreen] = footstone::value::HippyValue(y);
Expand All @@ -160,8 +160,8 @@ std::shared_ptr<DomNode> DevToolsUtil::GetHitNode(const std::shared_ptr<RootNode
return root_node;
}

hippy::dom::DomArgument argument = makeLocationArgument(x, y);
auto screen_shot_callback =
hippy::dom::DomArgument argument = MakeLocationArgument(x, y);
auto get_view_tag_callback =
MakeCopyable([promise = std::move(layout_promise)](std::shared_ptr<hippy::dom::DomArgument> arg) mutable {
footstone::value::HippyValue result_hippy_value;
arg->ToObject(result_hippy_value);
Expand All @@ -177,7 +177,7 @@ std::shared_ptr<DomNode> DevToolsUtil::GetHitNode(const std::shared_ptr<RootNode
int hippyTag = static_cast<int>(result_dom_object.find(kHippyTag)->second.ToInt32Checked());
promise.set_value(hippyTag);
});
base_node->CallFunction(kGetViewTagByLocation, argument, screen_shot_callback);
base_node->CallFunction(kGetViewTagByLocation, argument, get_view_tag_callback);
std::chrono::milliseconds span(10);
if (read_file_future.wait_for(span) == std::future_status::timeout) {
FOOTSTONE_DLOG(WARNING) << kDevToolsTag << "GetHitNode wait_for timeout";
Expand Down

0 comments on commit f69d299

Please sign in to comment.