Home / File/ ReactFlightStackConfigV8.js — react Source File

ReactFlightStackConfigV8.js — react Source File

Architecture documentation for ReactFlightStackConfigV8.js, a javascript file in the react codebase. 1 imports, 0 dependents.

File javascript BabelCompiler Validation 1 imports 5 functions

Entity Profile

Dependency Diagram

graph LR
  6b04fae3_e76f_58bb_e731_caa9abb4c49c["ReactFlightStackConfigV8.js"]
  d8f20c67_f5fa_0f0a_c967_c41fd9ffce07["ReactTypes"]
  6b04fae3_e76f_58bb_e731_caa9abb4c49c --> d8f20c67_f5fa_0f0a_c967_c41fd9ffce07
  style 6b04fae3_e76f_58bb_e731_caa9abb4c49c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import type {ReactStackTrace} from 'shared/ReactTypes';

let framesToSkip: number = 0;
let collectedStackTrace: null | ReactStackTrace = null;

const identifierRegExp = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;

function getMethodCallName(callSite: CallSite): string {
  const typeName = callSite.getTypeName();
  const methodName = callSite.getMethodName();
  const functionName = callSite.getFunctionName();
  let result = '';
  if (functionName) {
    if (
      typeName &&
      identifierRegExp.test(functionName) &&
      functionName !== typeName
    ) {
      result += typeName + '.';
    }
    result += functionName;
    if (
      methodName &&
      functionName !== methodName &&
      !functionName.endsWith('.' + methodName) &&
      !functionName.endsWith(' ' + methodName)
    ) {
      result += ' [as ' + methodName + ']';
    }
  } else {
    if (typeName) {
      result += typeName + '.';
    }
    if (methodName) {
      result += methodName;
    } else {
      result += '<anonymous>';
    }
  }
  return result;
}

function collectStackTracePrivate(
  error: Error,
  structuredStackTrace: CallSite[],
): string {
  const result: ReactStackTrace = [];
  // Collect structured stack traces from the callsites.
  // We mirror how V8 serializes stack frames and how we later parse them.
  for (let i = framesToSkip; i < structuredStackTrace.length; i++) {
    const callSite = structuredStackTrace[i];
// ... (194 more lines)

Domain

Subdomains

Dependencies

  • ReactTypes

Frequently Asked Questions

What does ReactFlightStackConfigV8.js do?
ReactFlightStackConfigV8.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in ReactFlightStackConfigV8.js?
ReactFlightStackConfigV8.js defines 5 function(s): collectStackTrace, collectStackTracePrivate, getMethodCallName, parseStackTrace, parseStackTracePrivate.
What does ReactFlightStackConfigV8.js depend on?
ReactFlightStackConfigV8.js imports 1 module(s): ReactTypes.
Where is ReactFlightStackConfigV8.js in the architecture?
ReactFlightStackConfigV8.js is located at packages/react-server/src/ReactFlightStackConfigV8.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-server/src).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free