@@ -33,10 +33,7 @@ import {
33
33
import { disableLogs , reenableLogs } from './DevToolsConsolePatching' ;
34
34
35
35
let prefix ;
36
- export function describeBuiltInComponentFrame (
37
- name : string ,
38
- ownerFn : void | null | Function ,
39
- ) : string {
36
+ export function describeBuiltInComponentFrame ( name : string ) : string {
40
37
if ( prefix === undefined ) {
41
38
// Extract the VM specific prefix used by each line.
42
39
try {
@@ -51,10 +48,7 @@ export function describeBuiltInComponentFrame(
51
48
}
52
49
53
50
export function describeDebugInfoFrame ( name : string , env : ?string ) : string {
54
- return describeBuiltInComponentFrame (
55
- name + ( env ? ' (' + env + ')' : '' ) ,
56
- null ,
57
- ) ;
51
+ return describeBuiltInComponentFrame ( name + ( env ? ' (' + env + ')' : '' ) ) ;
58
52
}
59
53
60
54
let reentry = false ;
@@ -292,15 +286,13 @@ export function describeNativeComponentFrame(
292
286
293
287
export function describeClassComponentFrame (
294
288
ctor : Function ,
295
- ownerFn : void | null | Function ,
296
289
currentDispatcherRef : CurrentDispatcherRef ,
297
290
) : string {
298
291
return describeNativeComponentFrame ( ctor , true , currentDispatcherRef ) ;
299
292
}
300
293
301
294
export function describeFunctionComponentFrame (
302
295
fn : Function ,
303
- ownerFn : void | null | Function ,
304
296
currentDispatcherRef : CurrentDispatcherRef ,
305
297
) : string {
306
298
return describeNativeComponentFrame ( fn , false , currentDispatcherRef ) ;
@@ -313,7 +305,6 @@ function shouldConstruct(Component: Function) {
313
305
314
306
export function describeUnknownElementTypeFrameInDEV (
315
307
type : any ,
316
- ownerFn : void | null | Function ,
317
308
currentDispatcherRef : CurrentDispatcherRef ,
318
309
) : string {
319
310
if ( ! __DEV__ ) {
@@ -330,31 +321,29 @@ export function describeUnknownElementTypeFrameInDEV(
330
321
) ;
331
322
}
332
323
if ( typeof type === 'string' ) {
333
- return describeBuiltInComponentFrame ( type , ownerFn ) ;
324
+ return describeBuiltInComponentFrame ( type ) ;
334
325
}
335
326
switch ( type ) {
336
327
case SUSPENSE_NUMBER :
337
328
case SUSPENSE_SYMBOL_STRING :
338
- return describeBuiltInComponentFrame ( 'Suspense' , ownerFn ) ;
329
+ return describeBuiltInComponentFrame ( 'Suspense' ) ;
339
330
case SUSPENSE_LIST_NUMBER :
340
331
case SUSPENSE_LIST_SYMBOL_STRING :
341
- return describeBuiltInComponentFrame ( 'SuspenseList' , ownerFn ) ;
332
+ return describeBuiltInComponentFrame ( 'SuspenseList' ) ;
342
333
}
343
334
if ( typeof type === 'object' ) {
344
335
switch ( type . $$typeof ) {
345
336
case FORWARD_REF_NUMBER :
346
337
case FORWARD_REF_SYMBOL_STRING :
347
338
return describeFunctionComponentFrame (
348
339
type . render ,
349
- ownerFn ,
350
340
currentDispatcherRef ,
351
341
) ;
352
342
case MEMO_NUMBER :
353
343
case MEMO_SYMBOL_STRING :
354
344
// Memo may contain any component type so we recursively resolve it.
355
345
return describeUnknownElementTypeFrameInDEV (
356
346
type . type ,
357
- ownerFn ,
358
347
currentDispatcherRef ,
359
348
) ;
360
349
case LAZY_NUMBER :
@@ -366,7 +355,6 @@ export function describeUnknownElementTypeFrameInDEV(
366
355
// Lazy may contain any component type so we recursively resolve it.
367
356
return describeUnknownElementTypeFrameInDEV (
368
357
init ( payload ) ,
369
- ownerFn ,
370
358
currentDispatcherRef ,
371
359
) ;
372
360
} catch ( x ) { }
0 commit comments