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

No exception is thrown when trying remove an user defined JS object on Chrome/Safari.

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      We have user defined JS obect as below:
      ===============
      <HTML>
      <HEAD>
      <script>
        var userDefinedJSObject = {
          text : "This is an indirectly user defined JS object"
        }
      </script>
      </HEAD>
      ===============

      Upon removal of the JS object defined above from within Applet as below
      ===========
        String memberToBeRemoved = "userDefinedJSObject";
              try {
                  win.removeMember(memberToBeRemoved);
                  setResult(false, "JS exception expected!");
              } catch (JSException jse) {
                  MsgPrinter.printMsg("Get expected JSException: " + jse);
                  setResult(true);
              }
      ==========

      we should get exception as on IE/FF
      ===========================
      @@@@ Get expected JSException: netscape.javascript.JSException: JavaScript error removing member "userDefinedJSObject"
      ===========================

      However, this is not true on Safari
      ==================
      @@@@ >>> TEST FAILED <<<
      #### Cause: JS exception expected!
      ==================

      Affected test cases:
      Java2JSTest::testJava2JSRemoveMemberWholeJSObject

        Attachments

          Activity

            People

            Assignee:
            cbensen Chris Bensen (Inactive)
            Reporter:
            stephenh Stephen Hu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: