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 | |
20 // Then create an NPObjectProxy in the plugin process that holds on to the | |
21 // dummyMethod function above. | |
22 plg.remember(dummyMethod); | |
23 } | |
24 </script> | |
25 </head> | |
26 | |
27 | |
28 <body> | |
29 <div id="statusPanel" style="border: 1px solid red; width: 100%"> | |
30 Test running.... | |
31 </div> | |
32 | |
33 | |
34 NPObject released on destruction<p> | |
35 | |
36 Tests that if a plugin creates an NPObject and releases it on destruction, | |
37 there's no crash when the plugin goes away. | |
38 | |
39 | |
40 <DIV ID=PluginDiv> | |
41 <embed name="plg" type="application/x-webkit-test-netscape"></embed> | |
42 </DIV> | |
43 <script> | |
44 Init(); | |
45 </script> | |
46 | |
47 </body> | |
48 </html> | |
49 | |
OLD | NEW |