[mono] Minor fixes to the wasm browser sample (#41992)
authorRyan Lucia <rylucia@microsoft.com>
Wed, 9 Sep 2020 06:26:39 +0000 (02:26 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Sep 2020 06:26:39 +0000 (08:26 +0200)
Use python 3, fix typo, prevent inlining

src/mono/netcore/sample/wasm/browser/Makefile
src/mono/netcore/sample/wasm/browser/Program.cs
src/mono/netcore/sample/wasm/browser/index.html

index d5227ac..05e22d8 100644 (file)
@@ -13,4 +13,4 @@ clean:
        rm -rf bin
 
 run:
-       cd bin/$(CONFIG)/publish && python server.py
\ No newline at end of file
+       cd bin/$(CONFIG)/publish && python3 server.py
index 36e09e4..9ee366c 100644 (file)
@@ -3,6 +3,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 
 using System;
+using System.Runtime.CompilerServices;
 
 namespace Sample
 {
@@ -13,6 +14,7 @@ namespace Sample
             Console.WriteLine ("Hello, World!");
         }
 
+        [MethodImpl(MethodImplOptions.NoInlining)]
         public static int TestMeaning()
         {
             return 42;
index 4cf3a1e..fdc43ad 100644 (file)
@@ -9,7 +9,7 @@
   </head>
   <body>
     <h3 id="header">Wasm Browser Sample</h3>
-    Result from Sample.Test.TestMeaaning: <span id="out"></span>
+    Result from Sample.Test.TestMeaning: <span id="out"></span>
     <script type='text/javascript'>
       var App = {
         init: function () {