GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove invokeGuardedCallback and replay trick · react/react@eb6c0cc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • fixtures/dom/src
    • toWarnDev.js
  • packages
    • react-cache/src/__tests__
      • ReactCacheOld-test.internal.js
    • react-dom/src/__tests__
      • InvalidEventListeners-test.js
      • ReactCompositeComponent-test.js
      • ReactDOMConsoleErrorReporting-test.js
      • ReactDOMConsoleErrorReportingLegacy-test.js
      • ReactDOMFizzServer-test.js
      • ReactDOMHydrationDiff-test.js
      • ReactDOMServerIntegrationLegacyContext-test.js
      • ReactDOMServerIntegrationLegacyContextDisabled-test.internal.js
      • ReactDOMServerIntegrationSelect-test.js
      • ReactDOMServerPartialHydration-test.internal.js
      • ReactErrorBoundaries-test.internal.js
      • ReactLegacyErrorBoundaries-test.internal.js
    • react-reconciler/src
      • ReactFiber.js
      • ReactFiberCommitWork.js
      • ReactFiberErrorLogger.js
      • ReactFiberHydrationContext.js
      • ReactFiberWorkLoop.js
      • __tests__
        • ErrorBoundaryReconciliation-test.internal.js
        • ReactBatching-test.internal.js
        • ReactConcurrentErrorRecovery-test.js
        • ReactHooks-test.internal.js
        • ReactIncrementalErrorHandling-test.internal.js
        • ReactIncrementalErrorLogging-test.js
        • ReactIncrementalErrorReplay-test.internal.js
        • ReactLazy-test.internal.js
        • ReactSuspense-test.internal.js
        • ReactSuspenseEffectsSemantics-test.js
        • ReactSuspenseFuzz-test.internal.js
        • ReactSuspensePlaceholder-test.internal.js
        • ReactSuspenseWithNoopRenderer-test.js
    • react-test-renderer/src/__tests__
      • ReactTestRenderer-test.internal.js
    • react/src/__tests__
      • ReactCoffeeScriptClass-test.coffee
      • ReactES6Class-test.js
      • ReactElementValidator-test.internal.js
      • ReactProfiler-test.internal.js
      • ReactTypeScriptClass-test.ts
      • forwardRef-test.internal.js
    • shared
      • ReactErrorUtils.js
      • ReactFeatureFlags.js
      • __tests__
        • ReactErrorUtils-test.internal.js
      • forks
        • ReactFeatureFlags.native-fb.js
        • ReactFeatureFlags.native-oss.js
        • ReactFeatureFlags.test-renderer.js
        • ReactFeatureFlags.test-renderer.native.js
        • ReactFeatureFlags.test-renderer.www.js
        • ReactFeatureFlags.www-dynamic.js
        • ReactFeatureFlags.www.js
        • invokeGuardedCallbackImpl.www.js
      • invokeGuardedCallbackImpl.js
    • use-sync-external-store/src/__tests__
      • useSyncExternalStoreShared-test.js
  • scripts
    • jest
      • shouldIgnoreConsoleError.js
    • rollup
      • forks.js

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎fixtures/dom/src/toWarnDev.js‎

Copy file name to clipboardExpand all lines: fixtures/dom/src/toWarnDev.js
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ const util = require('util');
77
function shouldIgnoreConsoleError(format, args) {
88
if (__DEV__) {
99
if (typeof format === 'string') {
10-
if (format.indexOf('Error: Uncaught [') === 0) {
11-
// This looks like an uncaught error from invokeGuardedCallback() wrapper
12-
// in development that is reported by jsdom. Ignore because it's noisy.
13-
return true;
14-
}
1510
if (format.indexOf('The above error occurred') === 0) {
1611
// This looks like an error addendum from ReactFiberErrorLogger.
1712
// Ignore it too.
Collapse file

‎packages/react-cache/src/__tests__/ReactCacheOld-test.internal.js‎

Copy file name to clipboardExpand all lines: packages/react-cache/src/__tests__/ReactCacheOld-test.internal.js
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
let ReactCache;
1313
let createResource;
1414
let React;
15-
let ReactFeatureFlags;
1615
let ReactNoop;
1716
let Scheduler;
1817
let Suspense;
@@ -27,9 +26,6 @@ describe('ReactCache', () => {
2726
beforeEach(() => {
2827
jest.resetModules();
2928

30-
ReactFeatureFlags = require('shared/ReactFeatureFlags');
31-
32-
ReactFeatureFlags.replayFailedUnitOfWorkWithInvokeGuardedCallback = false;
3329
React = require('react');
3430
Suspense = React.Suspense;
3531
ReactCache = require('react-cache');
Collapse file

‎packages/react-dom/src/__tests__/InvalidEventListeners-test.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/__tests__/InvalidEventListeners-test.js
+10-12Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('InvalidEventListeners', () => {
4343
);
4444
const node = container.firstChild;
4545

46-
spyOnProd(console, 'error');
46+
console.error = jest.fn();
4747

4848
const uncaughtErrors = [];
4949
function handleWindowError(e) {
@@ -70,18 +70,16 @@ describe('InvalidEventListeners', () => {
7070
}),
7171
);
7272

73-
if (!__DEV__) {
74-
expect(console.error).toHaveBeenCalledTimes(1);
75-
expect(console.error.mock.calls[0][0]).toEqual(
76-
expect.objectContaining({
77-
detail: expect.objectContaining({
78-
message:
79-
'Expected `onClick` listener to be a function, instead got a value of `string` type.',
80-
}),
81-
type: 'unhandled exception',
73+
expect(console.error).toHaveBeenCalledTimes(1);
74+
expect(console.error.mock.calls[0][0]).toEqual(
75+
expect.objectContaining({
76+
detail: expect.objectContaining({
77+
message:
78+
'Expected `onClick` listener to be a function, instead got a value of `string` type.',
8279
}),
83-
);
84-
}
80+
type: 'unhandled exception',
81+
}),
82+
);
8583
});
8684

8785
it('should not prevent null listeners, at dispatch', async () => {
Collapse file

‎packages/react-dom/src/__tests__/ReactCompositeComponent-test.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/__tests__/ReactCompositeComponent-test.js
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,13 +1231,6 @@ describe('ReactCompositeComponent', () => {
12311231
});
12321232
}).toThrow();
12331233
}).toErrorDev([
1234-
// Expect two errors because invokeGuardedCallback will dispatch an error event,
1235-
// Causing the warning to be logged again.
1236-
'Warning: No `render` method found on the RenderTextInvalidConstructor instance: ' +
1237-
'did you accidentally return an object from the constructor?',
1238-
'Warning: No `render` method found on the RenderTextInvalidConstructor instance: ' +
1239-
'did you accidentally return an object from the constructor?',
1240-
// And then two more because we retry errors.
12411234
'Warning: No `render` method found on the RenderTextInvalidConstructor instance: ' +
12421235
'did you accidentally return an object from the constructor?',
12431236
'Warning: No `render` method found on the RenderTextInvalidConstructor instance: ' +
@@ -1278,14 +1271,6 @@ describe('ReactCompositeComponent', () => {
12781271
});
12791272
}).toThrow();
12801273
}).toErrorDev([
1281-
// Expect two errors because invokeGuardedCallback will dispatch an error event,
1282-
// Causing the warning to be logged again.
1283-
'Warning: No `render` method found on the RenderTestUndefinedRender instance: ' +
1284-
'you may have forgotten to define `render`.',
1285-
'Warning: No `render` method found on the RenderTestUndefinedRender instance: ' +
1286-
'you may have forgotten to define `render`.',
1287-
1288-
// And then two more because we retry errors.
12891274
'Warning: No `render` method found on the RenderTestUndefinedRender instance: ' +
12901275
'you may have forgotten to define `render`.',
12911276
'Warning: No `render` method found on the RenderTestUndefinedRender instance: ' +

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.