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

Fail more gracefully if bootstrapping fails

XMLWordPrintable

    • b12
    • generic, x86
    • generic, windows_2000, windows_2003, windows_xp
    • Not verified

      6643773 highlighted the fact that if the new plug-in's low level bootstrapping code fails, the current behavior is very poor: it crashes the web browser. Asserts are in place for debug builds, but these are not present in product builds, so we will typically dereference a NULL pointer in C++ code and crash.

      Error checking should be added to the product builds so that the only user-visible side effect is perhaps a dialog box and a failure to render the applet. Specifically, explicit error checking needs to be added for at least the following situations:
        - The JVM fails to initialize, and therefore JavaVM_GetJNIEnv() returns NULL early on in the new plug-in's code.
        - Initialization of the JNI method IDs for the IExplorerPlugin, MozillaPlugin and AbstractPlugin Java classes fails for any reason.
        - Instantiation of the Java-side IExplorerPlugin or MozillaPlugin objects fails.

      Creation of for example our ActiveX control should simply return with an error, possibly raising a message box dialog. It should not crash.

            kbr Kenneth Russell (Inactive)
            kbr Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: