From 38af48d5fd863bca439ac7b885b9dc0284924db0 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Wed, 18 Dec 2019 07:47:33 -0800 Subject: [PATCH] Fix argument passed to method in TemplateViewComponentDescriptor Summary: Incorrect argument was being passed to `createShadowTreeFromTemplateProps` Changelog: [Internal] Reviewed By: shergin Differential Revision: D19114167 fbshipit-source-id: c0d7d96e5cbf43cbdcf653ff19b4565fd44e9994 --- ReactCommon/fabric/uimanager/UITemplateProcessor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp b/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp index a00ecdf43c2..35854e58996 100644 --- a/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp +++ b/ReactCommon/fabric/uimanager/UITemplateProcessor.cpp @@ -34,7 +34,7 @@ struct RBCContext { // TODO: use RBCContext instead of all the separate arguments. SharedShadowNode UITemplateProcessor::runCommand( const folly::dynamic &command, - Tag rootTag, + SurfaceId surfaceId, std::vector &nodes, std::vector ®isters, const ComponentDescriptorRegistry &componentDescriptorRegistry, @@ -49,7 +49,7 @@ SharedShadowNode UITemplateProcessor::runCommand( const auto parentTag = command[3].asInt(); const auto &props = command[4]; nodes[tag] = componentDescriptorRegistry.createNode( - tag + tagOffset, type, rootTag, props, nullptr); + tag + tagOffset, type, surfaceId, props, nullptr); if (parentTag > -1) { // parentTag == -1 indicates root node auto parentShadowNode = nodes[parentTag]; auto const &componentDescriptor = componentDescriptorRegistry.at( @@ -87,7 +87,7 @@ SharedShadowNode UITemplateProcessor::runCommand( for (const auto &nextCommand : nextCommands) { runCommand( nextCommand, - rootTag, + surfaceId, nodes, registers, componentDescriptorRegistry, @@ -102,7 +102,7 @@ SharedShadowNode UITemplateProcessor::runCommand( SharedShadowNode UITemplateProcessor::buildShadowTree( const std::string &jsonStr, - Tag rootTag, + SurfaceId surfaceId, const folly::dynamic ¶ms, const ComponentDescriptorRegistry &componentDescriptorRegistry, const NativeModuleRegistry &nativeModuleRegistry, @@ -131,7 +131,7 @@ SharedShadowNode UITemplateProcessor::buildShadowTree( } auto ret = runCommand( command, - rootTag, + surfaceId, nodes, registers, componentDescriptorRegistry,