| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 |
| 3 <head> |
| 4 <script src="npapi.js"></script> |
| 5 <script> |
| 6 |
| 7 function returnedMethod() { |
| 8 } |
| 9 |
| 10 function dummyMethod() { |
| 11 return returnedMethod; |
| 12 } |
| 13 |
| 14 var test_object; |
| 15 function Init() { |
| 16 var plg = window.document["plg"]; |
| 17 // Create the NPObjectStub in the plugin process first. This object's |
| 18 // deallocate function will release the NPObject below. |
| 19 test_object = plg.testCreateTestObject(); |
| 20 |
| 21 // Then create an NPObjectProxy in the plugin process that holds on to the |
| 22 // dummyMethod function above. |
| 23 test_object.pageTestObject(); |
| 24 } |
| 25 </script> |
| 26 </head> |
| 27 |
| 28 |
| 29 <body> |
| 30 <div id="statusPanel" style="border: 1px solid red; width: 100%"> |
| 31 Test running.... |
| 32 </div> |
| 33 |
| 34 |
| 35 NPObject released on destruction<p> |
| 36 |
| 37 Tests that if a plugin creates an NPObject and releases it on destruction, |
| 38 there's no crash when the plugin goes away. |
| 39 |
| 40 |
| 41 <DIV ID=PluginDiv> |
| 42 <embed name="plg" type="application/x-webkit-test-netscape"></embed> |
| 43 </DIV> |
| 44 <script> |
| 45 Init(); |
| 46 </script> |
| 47 |
| 48 </body> |
| 49 </html> |
| 50 |
| OLD | NEW |