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

Applet object passed from with applet to JS and then to another Applet is not recognized type Applet

XMLWordPrintable

    • generic
    • generic

      Issue:
      Applet object passed from with applet to JS and then to another Applet is not recognized type Applet

      we are passing an applet object itself from within itself to a JS method, inside which we call another Applet's method with the first applet as parameter. The destination Applet has public method defined as below:
      =====
          // This calls is initiated by helper applet via javascript
          public void setResourceLoader(Applet loader) {
              MsgPrinter
                      .printMsg("MainGetResourceApplet.setResourceLoader setting loader to: "
                              + loader);
              resourceLoader = loader;

              // Create a thread to setup the resource...
              setup();
          }
          
          
          public void setResourceLoader(GetResourceHelperApplet loader) {
              MsgPrinter
                      .printMsg("MainGetResourceApplet.setResourceLoader setting loader to: "
                              + loader);
              resourceLoader = loader;

              // Create a thread to setup the resource...
              setup();
          }
      ==================

      However, neither method eventually get called.

      trace
      ==========
      liveconnect: Failed: public void MainGetResourceApplet.setResourceLoader(java.applet.Applet), convert cost -1
      liveconnect: Failed: public void MainGetResourceApplet.setResourceLoader(GetResourceHelperApplet), convert cost -1
      netscape.javascript.JSException: JavaScript error while calling "passResourceLoader"
      at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
      at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
      at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
      at GetResourceHelperApplet.connect(GetResourceHelperApplet.java:68)
      at GetResourceHelperApplet.run(GetResourceHelperApplet.java:30)
      at java.lang.Thread.run(Unknown Source)
      =========

      Affected tests:
      LiveConnectTest::testJSGetResource
      LiveConnectTest::testJSGetResourceImage

            vdrozdov Victor Drozdov (Inactive)
            stephenh Stephen Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: