Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: ppapi/example/example.html

Issue 9655019: Fix a crash related to PPAPI scripting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/example/example.cc ('k') | ppapi/proxy/dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo. gif); 1 <body style="background-image:url(http://www.google.com/intl/en_ALL/images/logo. gif);
2 background-repeat:repeat" 2 background-repeat:repeat"
3 onload="SetPluginSize(400, 400)"> 3 onload="SetPluginSize(400, 400)">
4 4
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 isPluginDefaultSize = true; 6 isPluginDefaultSize = true;
7 7
8 function Test() { 8 function Test() {
9 plugin = document.getElementById('plugin'); 9 var plugin = document.getElementById('plugin');
10 // Confirm that this no longer segfaults. 10 // Confirm that this no longer segfaults.
11 alert(plugin.toString(new Array(10))); 11 alert(plugin.toString(new Array(10)));
12
13 // Confirm that the renderer doesn't crash when the plugin module goes away
14 // while waiting for the reply to the HasPropery sync message.
15 plugin.removePluginWhenHasPropertyCalled;
12 } 16 }
13 17
14 function SetPluginSize(width, height) { 18 function SetPluginSize(width, height) {
15 plugin = document.getElementById('plugin'); 19 plugin = document.getElementById('plugin');
16 size = document.getElementById('size'); 20 size = document.getElementById('size');
17 plugin.width = width; 21 plugin.width = width;
18 plugin.height = height; 22 plugin.height = height;
19 size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width; 23 size.innerHTML = "Height: " + plugin.height + ' Width: ' + plugin.width;
20 } 24 }
21 25
22 function ToggleSize() { 26 function ToggleSize() {
23 if (!isPluginDefaultSize) { 27 if (!isPluginDefaultSize) {
24 SetPluginSize(400, 400); 28 SetPluginSize(400, 400);
25 isPluginDefaultSize = true; 29 isPluginDefaultSize = true;
26 } else { 30 } else {
27 SetPluginSize(1000, 800); 31 SetPluginSize(1000, 800);
28 isPluginDefaultSize = false; 32 isPluginDefaultSize = false;
29 } 33 }
30 } 34 }
31 </script> 35 </script>
32 36
33 <button onclick='Test()'>Test</button> 37 <button onclick='Test()'>Test</button>
34 <button onclick='ToggleSize()'>Toggle Size</button> 38 <button onclick='ToggleSize()'>Toggle Size</button>
35 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi dth:200px;">FPS GOES HERE</div> 39 <div id="fps" style="background-color:white; font-weight:bold; padding:4px; wi dth:200px;">FPS GOES HERE</div>
36 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w idth:200px;"></div> 40 <div id="size" style="background-color:white; font-weight:bold; padding:4px; w idth:200px;"></div>
37 <object id="plugin" type="application/x-ppapi-example" width="400" height="400 " border="2px"></object> 41 <object id="plugin" type="application/x-ppapi-example" width="400" height="400 " border="2px"></object>
38 <hr> 42 <hr>
39 </body> 43 </body>
OLDNEW
« no previous file with comments | « ppapi/example/example.cc ('k') | ppapi/proxy/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698