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

Javascript to Java callback doesn't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: deploy
    • Subcomponent:
    • CPU:
      x86
    • OS:
      solaris_nevada

      Description

      The bug is related to the mozilla bugzilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=338905.

      In file deploy/src/plugin/solaris/nscore/JSObject.cpp, there is a
      comment snippet in line 265:
          /*
           * when JSObject is GCed after plugin is destroyed, inst is NULL
           * and code is JAVA_PLUGIN_JNIJS_FINALIZE. In this case, we still
           * need consume message from spontaneous pipe and ask browser to
           * release native JSObject, or spontaneous pipe will be corrupted
           * and resource leak
           */
      The comment's idea is that, if code isn't JAVA_PLUGIN_JNIJS_FINALIZE, the function should go on handling the following message instead of consuming the message and return.

      But the real code conflicts with this comment:
      267: if (code != JAVA_PLUGIN_JNIJS_FINALIZE) {

              if (inst == NULL || inst->IsDestroyPending()) {

                  // Consume the message
                  int raw_msg_len;
          ......

      I think that we should change the line 267 to "if (code == JAVA_PLUGIN_JNIJS_FINALIZE) {". The test case for bug 338905 can run correctly with the change applies.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryjen Henry Jen
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: