Repository: flutter
Issue: [web] Upgrading to 3.27.1 results in NoSuchMethodError: method not found: 'quickReject' (quickReject is not a function)
Labels: c: regression,platform-web,a: production,team-web

### Steps to reproduce

1. Upgrade Flutter web from 3.24.5 stable to 3.27.1 stable
2. `flutter build web --web-renderer canvaskit --source-maps`

### Expected results

No errors are expected.

### Actual results

We're seeing tens of thousands of `method not found: 'quickReject'` errors per day on Flutter 3.27.1 stable on all browsers, affecting a small subset of users.

Seen on:

* Latest Safari
* Latest Firefox
* Latest Chrome
* Latest Edge

Example stack A:

```
NoSuchMethodError: NoSuchMethodError: method not found: 'quickReject' (m.a.quickReject is not a function)
  at MeasureVisitor.visitPicture(org-dartlang-sdk:///lib/_engine/engine/canvaskit/canvas.dart:351:12)
  at PictureLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:224:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
```

Example stack B:

```
NoSuchMethodError: NoSuchMethodError: method not found: 'quickReject' (m.a.quickReject is not a function. (In 'm.a.quickReject(A.kp(A.aMG(s.a.cullRect())))', 'm.a.quickReject' is undefined))
  at MeasureVisitor.visitPicture(org-dartlang-sdk:///lib/_engine/engine/canvaskit/canvas.dart:351:12)
  at PictureLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:224:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at MeasureVisitor.visitOffset(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:349:5)
  at OffsetEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:162:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitClipRect(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:296:5)
  at ClipRectEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:102:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitTransform(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:343:5)
  at TransformEngineLayer.accept(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:146:5)
  at MeasureVisitor.measureChildren(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:250:9)
  at MeasureVisitor.visitRoot(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_visitor.dart:257:5)
  at Frame.raster.<anonymous function>(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer.dart:54:5)
  at timeAction(org-dartlang-sdk:///lib/_engine/engine/profiler.dart:41:12)
  at Frame.raster(org-dartlang-sdk:///lib/_engine/engine/canvaskit/layer_tree.dart:94:5)
  at ViewRasterizer.draw(org-dartlang-sdk:///lib/_engine/engine/canvaskit/rasterizer.dart:64:21)
  at _wrapJsFunctionForAsync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:311:19)
  at _wrapJsFunctionForAsync.<anonymous function>(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:336:23)
  at _asyncStartSync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:241:3)
  at ViewRasterizer.draw(org-dartlang-sdk:///lib/_engine/engine/canvaskit/rasterizer.dart:45:19)
  at ViewRasterizer.draw(org-dartlang-sdk:///lib/_engine/engine/canvaskit/rasterizer.dart:45:19)
  at CanvasKitRenderer._renderScene(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:451:11)
  at _wrapJsFunctionForAsync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:311:19)
  at _wrapJsFunctionForAsync.<anonymous function>(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:336:23)
  at _asyncStartSync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:241:3)
  at CanvasKitRenderer._renderScene(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:448:5)
  at CanvasKitRenderer._renderScene(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:448:5)
  at CanvasKitRenderer._kickRenderLoop(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:425:13)
  at _wrapJsFunctionForAsync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:311:19)
  at _wrapJsFunctionForAsync.<anonymous function>(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:336:23)
  at _asyncStartSync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:241:3)
  at CanvasKitRenderer._kickRenderLoop(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:422:23)
  at CanvasKitRenderer._kickRenderLoop(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:422:23)
  at CanvasKitRenderer.renderScene(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:417:15)
  at _wrapJsFunctionForAsync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:311:19)
  at _wrapJsFunctionForAsync.<anonymous function>(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:336:23)
  at _asyncStartSync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:241:3)
  at CanvasKitRenderer.renderScene(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:401:26)
  at CanvasKitRenderer.renderScene(org-dartlang-sdk:///lib/_engine/engine/canvaskit/renderer.dart:401:26)
  at EnginePlatformDispatcher.render(org-dartlang-sdk:///lib/_engine/engine/platform_dispatcher.dart:839:22)
  at _wrapJsFunctionForAsync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:311:19)
  at _wrapJsFunctionForAsync.<anonymous function>(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:336:23)
  at _asyncStartSync(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart:241:3)
  at EnginePlatformDispatcher.render(org-dartlang-sdk:///lib/_engine/engine/platform_dispatcher.dart:822:30)
  at EnginePlatformDispatcher.render(org-dartlang-sdk:///lib/_engine/engine/platform_dispatcher.dart:822:30)
  at RenderView.compositeFrame(org-dartlang-sdk:///lib/_engine/engine/window.dart:106:5)
  at RendererBinding.drawFrame(../../../../programs/flutter/packages/flutter/lib/src/rendering/binding.dart:614:20)
  at _WidgetsFlutterBinding&BindingBase&GestureBinding&SchedulerBinding&ServicesBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame(../../../../programs/flutter/packages/flutter/lib/src/widgets/binding.dart:1178:13)
  at RendererBinding._handlePersistentFrameCallback(../../../../programs/flutter/packages/flutter/lib/src/rendering/binding.dart:475:5)
  at A.cB4(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart:2352:9)
  at SchedulerBinding._invokeFrameCallback(../../../../programs/flutter/packages/flutter/lib/src/scheduler/binding.dart:1397:7)
  at A.t9.prototypeaof(../../../../programs/flutter/packages/flutter/lib/src/scheduler/binding.dart:1390:8)
  at SchedulerBinding.handleDrawFrame(../../../../programs/flutter/packages/flutter/lib/src/scheduler/binding.dart:1318:9)
  at _SentryWidgetsFlutterBinding&WidgetsFlutterBinding&SentryWidgetsBindingMixin.handleDrawFrame(../../../../.pub-cache/hosted/pub.dev/sentry_flutter-8.12.0/lib/src/binding_wrapper.dart:115:11)
  at SchedulerBinding._handleDrawFrame(../../../../programs/flutter/packages/flutter/lib/src/scheduler/binding.dart:1176:5)
  at A.cB4(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart:2342:9)
  at A.c13(org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1414:12)
  at _CustomZone.run(org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1405:3)
  at _CustomZone.run(org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1316:34)
  at _CustomZone.runGuarded(org-dartlang-sdk:///dart-sdk/lib/async/zone.dart:1225:7)
  at invoke(org-dartlang-sdk:///lib/_engine/engine/platform_dispatcher.dart:1410:9)
  at initializeEngineServices.<anonymous function>.<anonymous function>(org-dartlang-sdk:///lib/_engine/engine/platform_dispatcher.dart:310:5)
  at _callDartFunctionFast1(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart:347:27)
  at _functionToJS1(org-dartlang-sdk:///dart-sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart:127:11)
```

### Code sample

We are unable to reproduce the issue with any code sample.

### Screenshots or Video

_No response_

### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.27.1, on macOS 15.1.1 24B91 darwin-arm64, locale en-US)
    • Flutter version 3.27.1 on channel stable at /Users/james/fvm/versions/3.27.1
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 17025dd882 (10 days ago), 2024-12-17 03:23:09 +0900
    • Engine revision cb4b5fff73
    • Dart version 3.6.0
    • DevTools version 2.40.2
```

</details>