| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <!-- Issue 45 from the Native Client security contest --> | 2 <!-- Issue 45 from the Native Client security contest --> |
| 3 <head> | 3 <head> |
| 4 <title> Native Client Security Contest -- Issue 45 </title> | 4 <title> Native Client Security Contest -- Issue 45 </title> |
| 5 </head> | 5 </head> |
| 6 <script> | 6 <script> |
| 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 boom = function() { | 21 var boom = function() { |
| 22 var shared_memory = server.__shmFactory(0xdead); | 22 var shared_memory = server.__shmFactory(0xdead); |
| 23 shared_memory.read(0x80000000, 0x80000004); | 23 shared_memory.read(0x80000000, 0x80000004); |
| 24 } | 24 } |
| 25 </script> | 25 </script> |
| 26 <body onload="PostInit();" onunload="ClearTimeout();"> | 26 <body onload="PostInit();" onunload="ClearTimeout();"> |
| 27 <button type="button" id="mybutton" disabled="true" | 27 <button type="button" id="mybutton" disabled="true" |
| 28 onclick="boom();" />boom</button> | 28 onclick="boom();" />boom</button> |
| 29 <embed type="application/x-nacl-srpc" id="nacl_server" | 29 <embed type="application/x-nacl" id="nacl_server" |
| 30 width="0" height="0" src="srpc_nrd_server.nexe" /> | 30 width="0" height="0" src="srpc_nrd_server.nexe" /> |
| 31 <p> | 31 <p> |
| 32 <b>Note:</b> For the purposes of contest issue #45, the actual expected | 32 <b>Note:</b> For the purposes of contest issue #45, the actual expected |
| 33 result when clicking the "Boom" button is a browser that continues to | 33 result when clicking the "Boom" button is a browser that continues to |
| 34 function properly. | 34 function properly. |
| 35 </p> | 35 </p> |
| 36 </body> | 36 </body> |
| 37 </html> | 37 </html> |
| OLD | NEW |