| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <!-- Issue 44 from the Native Client security contest --> | 2 <!-- Issue 44 from the Native Client security contest --> |
| 3 <head> | 3 <head> |
| 4 <title>Native Client Security Contest -- Issue 44</title> | 4 <title>Native Client Security Contest -- Issue 44</title> |
| 5 </head> | 5 </head> |
| 6 <script type="application/x-javascript"> | 6 <script type="application/x-javascript"> |
| 7 var server; | 7 var server; |
| 8 var timeout; | 8 var timeout; |
| 9 var PostInit = function() { | 9 var PostInit = function() { |
| 10 server = document.getElementById('nacl_server'); | 10 server = document.getElementById('nacl_server'); |
| 11 if (server.__moduleReady == undefined) { | 11 if (server.__moduleReady == undefined) { |
| 12 timeout = setTimeout(PostInit, 100); | 12 timeout = setTimeout(PostInit, 100); |
| 13 return; | 13 return; |
| 14 } | 14 } |
| 15 var buttonid = document.getElementById("mybutton"); | 15 var buttonid = document.getElementById("mybutton"); |
| 16 buttonid.disabled = null; | 16 buttonid.disabled = null; |
| 17 } | 17 } |
| 18 var ClearTimeout = function() { | 18 var ClearTimeout = function() { |
| 19 clearTimeout(timeout); | 19 clearTimeout(timeout); |
| 20 } | 20 } |
| 21 var cjetm = function() { | 21 var cjetm = function() { |
| 22 var socket_address2 = server.start_server(); | 22 var socket_address2 = server.start_server(); |
| 23 var con_sock = socket_address2.connect(); | 23 var con_sock = socket_address2.connect(); |
| 24 alert('about to boom!'); | 24 alert('about to boom!'); |
| 25 var region_size = 2147483648; | 25 var region_size = 2147483648; |
| 26 var shared_memory = server.__shmFactory(region_size); | 26 var shared_memory = server.__shmFactory(region_size); |
| 27 } | 27 } |
| 28 </script> | 28 </script> |
| 29 <body onload="PostInit()" onunload="ClearTimeout();"> | 29 <body onload="PostInit()" onunload="ClearTimeout();"> |
| 30 <embed type="application/x-nacl-srpc" id="nacl_server" | 30 <embed type="application/x-nacl" id="nacl_server" |
| 31 width="0" height="0" src="srpc_nrd_server.nexe" /> | 31 width="0" height="0" src="srpc_nrd_server.nexe" /> |
| 32 | 32 |
| 33 <button type="button" id="mybutton" disabled="true" | 33 <button type="button" id="mybutton" disabled="true" |
| 34 onclick="cjetm();">Crash me</button> | 34 onclick="cjetm();">Crash me</button> |
| 35 <p> | 35 <p> |
| 36 <b>Note:</b> For the purposes of contest issue #44, the actual expected | 36 <b>Note:</b> For the purposes of contest issue #44, the actual expected |
| 37 result when clicking the "Crash me" button is a browser that continues | 37 result when clicking the "Crash me" button is a browser that continues |
| 38 to function properly. | 38 to function properly. |
| 39 </p> | 39 </p> |
| 40 </body> | 40 </body> |
| 41 </html> | 41 </html> |
| OLD | NEW |