[WebView][Non-ACR] Limit a number of renderer process 89/218489/1
authoryh106.jung <yh106.jung@samsung.com>
Tue, 19 Nov 2019 01:15:06 +0000 (10:15 +0900)
committeryh106.jung <yh106.jung@samsung.com>
Mon, 25 Nov 2019 01:23:32 +0000 (10:23 +0900)
When app is in background and app creates many renderer process, app is
blocked. In order to resolve this problem, we limit the number of
renderer process.

Change-Id: Ie1a2622532bafa7e049bae9d05ebd287b309eb2b
Signed-off-by: yh106.jung <yh106.jung@samsung.com>
tct-suite-vs/Tizen.WebView.Tests/Program.cs

index 38f4912..86fa09a 100755 (executable)
 using System;
 using NUnitLite.TUnit;
 using AutoTemplate;
-using Tizen.WebView;\r
-\r
+using System.Collections.Generic;
+using Tizen.WebView;
+
 namespace XamarinForTizen.Tizen
 {
 
     class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication
     {
         private static App _app;
+        private static string[] _chromiumArgv = { "--renderer-process-limit=1" };
+
         protected override void OnCreate()
         {
             base.OnCreate();
@@ -48,6 +51,9 @@ namespace XamarinForTizen.Tizen
             var app = new Program();
             global::Xamarin.Forms.Platform.Tizen.Forms.Init(app);
             Chromium.Initialize();
+            List<string> argv = new List<string>(_chromiumArgv);
+            argv.Insert(0, app.Name);
+            Chromium.SetArguments(argv.ToArray());
             app.Run(args);
             Chromium.Shutdown();
         }