Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6721587

Browser crash on launching applets that perform java to java-javascript communic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 6u5
    • deploy
    • x86
    • windows_2008

      OPERATING SYSTEM
      ----------------
      Windows Server 2008

      FULL JDK VERSION
      ----------------
      java version "1.6.0_05"
      Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
      Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

      DESCRIPTION
      -----------
      Mozilla/Firefox/Netscape crashes on Windows 2008 while launching non-converted applets that perform java to java-js communication.

      STEPS TO REPRODUCE
      -------------------
      1. Download the above mentioned Sun java build.

      2. Check that java plugin is associated with Internet Explorer &
         Mozilla during installation or through the control panel.

      3. Launch the below test case using mozilla/firefox/netscape. The
         browser will crash.

      Expected Result:
      Browser should not crash and applets should be launched smoothly.

      Observed Result:
      Browser crashes.

      TESTCASE SOURCE
      ---------------
      -----------------------------------------------------------------------
      Test.html
      -----------------------------------------------------------------------
      <html>
      <head/>
      <body lang=EN-US style='tab-interval:36.0pt'>

      <div class=Section1>

      <p class=MsoNormal><script>
      function changeMyCar(){
      window.document.myCar.src="Ferrari.jpg";
      }
      </script><o:p>&nbsp;</o:p></p>

      <div class=MsoNormal align=center style='text-align:center'>

      <hr size=2 width="100%" align=center>

      </div>

      <p class=MsoNormal><span class=GramE><b>DOM scripting via <span class=SpellE>JSObject</span>.</b></span></p>

      <p>An applet will change the car picture via <span class=SpellE>JSObject</span>.
      Click on the &#8216;Upgrade My Car&#8217; button<span
      style='mso-spacerun:yes'>&nbsp; </span>and observe the change.</p>

      <p>

      <applet code="AppScripting.class" width="400" height="30" name="Applet1" MAYSCRIPT="true">
      </applet>

      </p>

      <p><img width=200 height=150 id="_x0000_i1028" src=Vauxhall.jpg name=myCar></p>

      <div class=MsoNormal align=center style='text-align:center'>

      <hr size=2 width="100%" align=center>

      </div>

      </div>

      </body>

      </html>
      -----------------------------------------------------------------------

      -----------------------------------------------------------------------
      AppScripting.java
      -----------------------------------------------------------------------
      import netscape.javascript.JSObject;
      import java.lang.*;
      import java.applet.*;
      import java.awt.*;
      import java.awt.event.*;

      public class AppScripting extends Applet implements ActionListener{
      JSObject win;
      String dispMsg;
      private Button fireButton;

      public void init(){
      win = JSObject.getWindow(this);
      fireButton = new Button("Upgrade My Car");

      add(fireButton);
      fireButton.addActionListener(this);
      }

      public void actionPerformed(ActionEvent e){
      if(e.getSource() == fireButton){
      win.call("changeMyCar",null);
      }
      }


      }
      -----------------------------------------------------------------------

            skoppar Sunita Koppar (Inactive)
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: