Repository: flutter
Issue: WebView loads a long HTML display blank
Labels: c: crash,e: device-specific,a: platform-views,p: webview,package,team-ecosystem,P3,platform-views: vd,found in release: 2.2,found in release: 2.5,platform-views: tlhc,triaged-ecosystem

## Steps to Reproduce

<details><summary>Sample code</summary>

```dart
import 'dart:convert';

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: WebViewSample(),
      ),
    );
  }
}

class WebViewSample extends StatefulWidget {

  @override
  createState() => _WebViewState();

}


class _WebViewState extends State<WebViewSample> {

  var height = 200.0;
  WebViewController webController;
  String html = "<!DOCTYPE html>" +
      "<html>" +
      "    <head>" +
      "        <meta charset=\"UTF-8\">" +
      "        <script>" +
      "            window.onload = function(){" +
      "                var aDiv = document.getElementsByTagName('div');" +
      "                 " +
      "                var str = \"\";" +
      "                for(var i = 0,j = 0;i<3000;i++ ){" +
      "                    str += \"<div>test webview html \"+ i + \"</div>\";" +
      "                }" +
      "                document.body.innerHTML = str;" +
      "            }" +
      "        </script>" +
      "    </head>" +
      "    <body>" +
      "         " +
      "    </body>" +
      "</html>";

  /// when change 1800 to bigger number webview show blank
  /// when change 1800 to smaller number webview normal，such as 300

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Container(
          child: Text("header"),
        ),
        Container(
          color: Colors.red,
          width: 400.0,
          height: 100.0,
          child: Center(child: Text("header")),
        ),
        Expanded(
          child: SingleChildScrollView(
            child: Column(
              children: <Widget>[
                Container(
                  height: height,
                  child: WebView(
                    gestureRecognizers: <Factory<OneSequenceGestureRecognizer>>{
                      Factory<VerticalDragGestureRecognizer>(
                            () => VerticalDragGestureRecognizer(),
                      ),
                    },
                    onWebViewCreated: (WebViewController controller) {
                      webController = controller;
                    },
                    onPageFinished: (String url) {
                      print(" onPageFinished");
                      webController.evaluateJavascript(
                          "document.body.scrollHeight").then((value) {
                           print(" htmlHeight : $value");
                           setState(() {
                            height = double.parse(value);
                          });
                      });
                    },
                    javascriptMode: JavascriptMode.unrestricted,
                    initialUrl: Uri.dataFromString(html,
                        mimeType: "text/html",
                        encoding: Encoding.getByName("utf-8")
                    ).toString(),
                    // onWebViewCreated: (WebViewController controller){
                    //   controller.loadUrl(url)
                    // },
                  ),
                ),
                Container(
                  color: Colors.red,
                  width: 400.0,
                  height: 300.0,
                  child: Text("ohter 1"),
                ),
                Container(
                  color: Colors.grey,
                  width: 400.0,
                  height: 300.0,
                  child: Text("ohter 2"),
                ),
                Container(
                  color: Colors.blue,
                  width: 400.0,
                  height: 300.0,
                  child: Text("ohter 3"),
                ),
                Container(
                  color: Colors.grey,
                  width: 400.0,
                  height: 300.0,
                  child: Text("ohter 2"),
                ),
              ],
            ),
          ),
        ),
        Container(
          width: 400.0,
          color:Colors.pink,
          height:20.0,
          child: Center(child:Text("footer")),
        ),
      ],
    );
  }


}

```
</details>

 webview_flutter: ^0.3.24


**Expected results:** 
It is expected that long loaded HTML can be displayed normally，

**Actual results:** <!-- what did you see? -->
According to the layout nesting in my code, loading long HTML can not be displayed normally, blank, loading short HTML can be displayed normally


<details><summary>Logs</summary>

```
  2020-09-23 18:17:19.127238+0800 Runner[2685:137016] WF: _WebFilterIsActive returning: NO
2020-09-23 18:17:19.506430+0800 Runner[2685:137103] flutter:  onPageFinished
2020-09-23 18:17:19.662384+0800 Runner[2685:137103] flutter:  htmlHeight : 81000
2020-09-23 18:17:21.016750+0800 Runner[2685:137016] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2020-09-23 18:17:21.016823+0800 Runner[2685:137016] WF: _WebFilterIsActive returning: NO
2020-09-23 18:17:21.142529+0800 Runner[2685:137016] [ProcessSuspension] 0x119ce1740 - ProcessAssertion::processAssertionWasInvalidated()
2020-09-23 18:17:21.341480+0800 Runner[2685:137103] flutter:  onPageFinished
2020-09-23 18:17:21.593578+0800 Runner[2685:137103] [VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: PlatformException(evaluateJavaScript_failed, Failed evaluating JavaScript, JavaScript string was: 'document.body.scrollHeight'
Error Domain=WKErrorDomain Code=2 "The Web Content process was terminated" UserInfo={NSLocalizedDescription=The Web Content process was terminated})
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:572:7)
#1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:161:18)
<asynchronous suspension>
#2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
#3      MethodChannelWebViewPlatform.evaluateJavascript (package:webview_flutter/src/webview_method_channel.dart:115:21)
#4      WebViewController.evaluateJavascript (package:webview_flutter/webview_flutter.dart:672:39)
#5      _WebViewState.build.<anonymous closure> (package:webview_flutter_example/main.dart:87:37)
#6      _PlatformCallbacksHandler.onPageFinished (package:webview_flutter/webview_flutter.dart:491:29)
#7      MethodChannelWebViewPlatform._onMethodCall (package:webview_flutter/src/webview_method_channel.dart:41:35)
#8      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:432:55)
#9      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:385:33)
#10     _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:267:33)
#11     _invoke3.<anonymous closure> (dart:ui/hooks.dart:282:15)
#12     _rootRun (dart:async/zone.dart:1190:13)
#13     _CustomZone.run (dart:async/zone.dart:1093:19)
#14     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
#15     _invoke3 (dart:ui/hooks.dart:281:10)
#16     _dispatchPlatformMessage (dart:ui/hooks.dart:156:5)
2020-09-23 18:17:21.680720+0800 Runner[2685:137016] [ProcessSuspension] 0x119ce1950 - ProcessAssertion::processAssertionWasInvalidated()
````
</details>

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.5 19F101, locale en-CN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)

• No issues found!


</details>