@@ -492,7 +492,16 @@ export function jsxProdSignatureRunningInDevWithDynamicChildren(
492
492
) {
493
493
if ( __DEV__ ) {
494
494
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
+ ) ;
496
505
}
497
506
}
498
507
@@ -505,7 +514,16 @@ export function jsxProdSignatureRunningInDevWithStaticChildren(
505
514
) {
506
515
if ( __DEV__ ) {
507
516
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
+ ) ;
509
527
}
510
528
}
511
529
@@ -518,6 +536,28 @@ const didWarnAboutKeySpread = {};
518
536
* @param {string } key
519
537
*/
520
538
export 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
+ ) {
521
561
if ( __DEV__ ) {
522
562
if ( ! isValidElementType ( type ) ) {
523
563
// This is an invalid element type.
@@ -716,8 +756,8 @@ export function jsxDEV(type, config, maybeKey, isStaticChildren, source, self) {
716
756
source ,
717
757
getOwner ( ) ,
718
758
props ,
719
- __DEV__ && enableOwnerStacks ? Error ( 'react-stack-top-frame' ) : undefined ,
720
- __DEV__ && enableOwnerStacks ? createTask ( getTaskName ( type ) ) : undefined ,
759
+ debugStack ,
760
+ debugTask ,
721
761
) ;
722
762
}
723
763
}
0 commit comments