@@ -492,7 +492,16 @@ export function jsxProdSignatureRunningInDevWithDynamicChildren(
492492) {
493493 if ( __DEV__ ) {
494494 const isStaticChildren = false ;
495- return jsxDEV ( type , config , maybeKey , isStaticChildren , source , self ) ;
495+ return jsxDEVImpl (
496+ type ,
497+ config ,
498+ maybeKey ,
499+ isStaticChildren ,
500+ source ,
501+ self ,
502+ __DEV__ && enableOwnerStacks ? Error ( 'react-stack-top-frame' ) : undefined ,
503+ __DEV__ && enableOwnerStacks ? createTask ( getTaskName ( type ) ) : undefined ,
504+ ) ;
496505 }
497506}
498507
@@ -505,7 +514,16 @@ export function jsxProdSignatureRunningInDevWithStaticChildren(
505514) {
506515 if ( __DEV__ ) {
507516 const isStaticChildren = true ;
508- return jsxDEV ( type , config , maybeKey , isStaticChildren , source , self ) ;
517+ return jsxDEVImpl (
518+ type ,
519+ config ,
520+ maybeKey ,
521+ isStaticChildren ,
522+ source ,
523+ self ,
524+ __DEV__ && enableOwnerStacks ? Error ( 'react-stack-top-frame' ) : undefined ,
525+ __DEV__ && enableOwnerStacks ? createTask ( getTaskName ( type ) ) : undefined ,
526+ ) ;
509527 }
510528}
511529
@@ -518,6 +536,28 @@ const didWarnAboutKeySpread = {};
518536 * @param {string } key
519537 */
520538export function jsxDEV ( type , config , maybeKey , isStaticChildren , source , self ) {
539+ return jsxDEVImpl (
540+ type ,
541+ config ,
542+ maybeKey ,
543+ isStaticChildren ,
544+ source ,
545+ self ,
546+ __DEV__ && enableOwnerStacks ? Error ( 'react-stack-top-frame' ) : undefined ,
547+ __DEV__ && enableOwnerStacks ? createTask ( getTaskName ( type ) ) : undefined ,
548+ ) ;
549+ }
550+
551+ function jsxDEVImpl (
552+ type ,
553+ config ,
554+ maybeKey ,
555+ isStaticChildren ,
556+ source ,
557+ self ,
558+ debugStack ,
559+ debugTask ,
560+ ) {
521561 if ( __DEV__ ) {
522562 if ( ! isValidElementType ( type ) ) {
523563 // This is an invalid element type.
@@ -716,8 +756,8 @@ export function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
716756 source ,
717757 getOwner ( ) ,
718758 props ,
719- __DEV__ && enableOwnerStacks ? Error ( 'react-stack-top-frame' ) : undefined ,
720- __DEV__ && enableOwnerStacks ? createTask ( getTaskName ( type ) ) : undefined ,
759+ debugStack ,
760+ debugTask ,
721761 ) ;
722762 }
723763}
0 commit comments