mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove need to copy JSI arguments
Summary: Since the generated functions move JSI arguments as rvalues into these methods, using const lvaue references doesn't provide any benefit, and in fact hinders our ability to *move* arguments somewhere else and instead requires having to confusingly copy them instead (which JSI makes more difficult). Changelog: Internal Reviewed By: nlutsenko Differential Revision: D34704455 fbshipit-source-id: 520a358d8a7adeb848e7d7eb204f7154f8f4b58d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
269fa37bb8
commit
ceeb8ec8b1
@@ -152,12 +152,7 @@ module.exports = {
|
||||
`Unsupported type for param "${param.name}" in ${prop.name}. Found: ${typeName}`,
|
||||
resolveAlias,
|
||||
);
|
||||
const isObject = translatedParam.startsWith('jsi::');
|
||||
return (
|
||||
(isObject
|
||||
? 'const ' + translatedParam + ' &'
|
||||
: translatedParam + ' ') + param.name
|
||||
);
|
||||
return `${translatedParam} ${param.name}`;
|
||||
})
|
||||
.join(', ');
|
||||
return propertyTemplate
|
||||
|
||||
Reference in New Issue
Block a user