diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 60c418950a96..466d561297d7 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -1779,8 +1779,6 @@ jsid nsDOMClassInfo::sAddEventListener_id= JSID_VOID; jsid nsDOMClassInfo::sBaseURIObject_id = JSID_VOID; jsid nsDOMClassInfo::sNodePrincipal_id = JSID_VOID; jsid nsDOMClassInfo::sDocumentURIObject_id=JSID_VOID; -jsid nsDOMClassInfo::sJava_id = JSID_VOID; -jsid nsDOMClassInfo::sPackages_id = JSID_VOID; jsid nsDOMClassInfo::sWrappedJSObject_id = JSID_VOID; jsid nsDOMClassInfo::sURL_id = JSID_VOID; jsid nsDOMClassInfo::sKeyPath_id = JSID_VOID; @@ -2051,8 +2049,6 @@ nsDOMClassInfo::DefineStaticJSVals(JSContext *cx) SET_JSID_TO_STRING(sBaseURIObject_id, cx, "baseURIObject"); SET_JSID_TO_STRING(sNodePrincipal_id, cx, "nodePrincipal"); SET_JSID_TO_STRING(sDocumentURIObject_id,cx,"documentURIObject"); - SET_JSID_TO_STRING(sJava_id, cx, "java"); - SET_JSID_TO_STRING(sPackages_id, cx, "Packages"); SET_JSID_TO_STRING(sWrappedJSObject_id, cx, "wrappedJSObject"); SET_JSID_TO_STRING(sURL_id, cx, "URL"); SET_JSID_TO_STRING(sKeyPath_id, cx, "keyPath"); @@ -5155,8 +5151,6 @@ nsDOMClassInfo::ShutDown() sBaseURIObject_id = JSID_VOID; sNodePrincipal_id = JSID_VOID; sDocumentURIObject_id=JSID_VOID; - sJava_id = JSID_VOID; - sPackages_id = JSID_VOID; sWrappedJSObject_id = JSID_VOID; sKeyPath_id = JSID_VOID; sAutoIncrement_id = JSID_VOID; @@ -7294,34 +7288,7 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, return NS_OK; } - if (id == sJava_id || id == sPackages_id) { - static bool isResolvingJavaProperties; - - if (!isResolvingJavaProperties) { - isResolvingJavaProperties = true; - - // Tell the window to initialize the Java properties. The - // window needs to do this as we need to do this only once, - // and detecting that reliably from here is hard. - - win->InitJavaProperties(); - - JSBool hasProp; - bool ok = ::JS_HasPropertyById(cx, obj, id, &hasProp); - - isResolvingJavaProperties = false; - - if (!ok) { - return NS_ERROR_FAILURE; - } - - if (hasProp) { - *objp = obj; - - return NS_OK; - } - } - } else if (id == sDialogArguments_id && win->IsModalContentWindow()) { + if (id == sDialogArguments_id && win->IsModalContentWindow()) { nsCOMPtr args; ((nsGlobalModalWindow *)win)->GetDialogArguments(getter_AddRefs(args)); diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 33e31ca833e9..9cf5873154e5 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -452,195 +452,6 @@ static const char kPkcs11ContractID[] = NS_PKCS11_CONTRACTID; #endif static const char sPopStatePrefStr[] = "browser.history.allowPopState"; -class nsDummyJavaPluginOwner : public nsIPluginInstanceOwner -{ -public: - nsDummyJavaPluginOwner(nsIDocument *aDocument) - : mDocument(aDocument) - { - } - - void Destroy(); - - NS_DECL_CYCLE_COLLECTING_ISUPPORTS - NS_DECL_NSIPLUGININSTANCEOWNER - - NS_IMETHOD GetURL(const char *aURL, const char *aTarget, - nsIInputStream *aPostStream, - void *aHeadersData, PRUint32 aHeadersDataLen); - NS_IMETHOD ShowStatus(const PRUnichar *aStatusMsg); - NPError ShowNativeContextMenu(NPMenu* menu, void* event); - NPBool ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, - double *destX, double *destY, NPCoordinateSpace destSpace); - void SendIdleEvent(); - - NPError InitAsyncSurface(NPSize *size, NPImageFormat format, - void *initData, NPAsyncSurface *surface) - { return NPERR_GENERIC_ERROR; } - - NPError FinalizeAsyncSurface(NPAsyncSurface *surface) { return NPERR_GENERIC_ERROR; } - void SetCurrentAsyncSurface(NPAsyncSurface *surface, NPRect *changed) { return; } - - NS_DECL_CYCLE_COLLECTION_CLASS(nsDummyJavaPluginOwner) - -private: - nsRefPtr mInstance; - nsCOMPtr mDocument; -}; - -NS_IMPL_CYCLE_COLLECTION_2(nsDummyJavaPluginOwner, mDocument, mInstance) - -// QueryInterface implementation for nsDummyJavaPluginOwner -NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsDummyJavaPluginOwner) - NS_INTERFACE_MAP_ENTRY(nsISupports) - NS_INTERFACE_MAP_ENTRY(nsIPluginInstanceOwner) -NS_INTERFACE_MAP_END - -NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDummyJavaPluginOwner) -NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDummyJavaPluginOwner) - - -void -nsDummyJavaPluginOwner::Destroy() -{ - // If we have a plugin instance, stop it and destroy it now. - if (mInstance) { - mInstance->Stop(); - mInstance->InvalidateOwner(); - mInstance = nsnull; - } - - mDocument = nsnull; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::SetInstance(nsNPAPIPluginInstance *aInstance) -{ - // If we're going to null out mInstance after use, be sure to call - // mInstance->InvalidateOwner() here, since it now won't be called - // from nsDummyJavaPluginOwner::Destroy(). - if (mInstance && !aInstance) - mInstance->InvalidateOwner(); - - mInstance = aInstance; - - return NS_OK; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::GetInstance(nsNPAPIPluginInstance **aInstance) -{ - *aInstance = mInstance; - NS_IF_ADDREF(*aInstance); - - return NS_OK; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::GetWindow(NPWindow *&aWindow) -{ - aWindow = nsnull; - - return NS_OK; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::CallSetWindow() -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::GetMode(PRInt32 *aMode) -{ - // This is wrong, but there's no better alternative. - *aMode = NP_EMBED; - - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::CreateWidget(void) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::GetURL(const char *aURL, const char *aTarget, - nsIInputStream *aPostStream, - void *aHeadersData, PRUint32 aHeadersDataLen) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::ShowStatus(const char *aStatusMsg) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::ShowStatus(const PRUnichar *aStatusMsg) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NPError -nsDummyJavaPluginOwner::ShowNativeContextMenu(NPMenu* menu, void* event) -{ - return NPERR_GENERIC_ERROR; -} - -NPBool -nsDummyJavaPluginOwner::ConvertPoint(double sourceX, double sourceY, NPCoordinateSpace sourceSpace, - double *destX, double *destY, NPCoordinateSpace destSpace) -{ - return false; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::GetDocument(nsIDocument **aDocument) -{ - NS_IF_ADDREF(*aDocument = mDocument); - - return NS_OK; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::InvalidateRect(NPRect *invalidRect) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::InvalidateRegion(NPRegion invalidRegion) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::RedrawPlugin() -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::GetNetscapeWindow(void *value) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -NS_IMETHODIMP -nsDummyJavaPluginOwner::SetEventModel(PRInt32 eventModel) -{ - return NS_ERROR_NOT_IMPLEMENTED; -} - -void -nsDummyJavaPluginOwner::SendIdleEvent() -{ -} - /** * An object implementing the window.URL property. */ @@ -858,7 +669,6 @@ NewOuterWindowProxy(JSContext *cx, JSObject *parent) nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow) : nsPIDOMWindow(aOuterWindow), mIsFrozen(false), - mDidInitJavaProperties(false), mFullScreen(false), mIsClosed(false), mInClose(false), @@ -1366,17 +1176,6 @@ nsGlobalWindow::FreeInnerObjects() js::DontNukeForGlobalObject); } - if (mDummyJavaPluginOwner) { - // Tear down the dummy java plugin. - - // XXXjst: On a general note, should windows with java stuff in - // them ever even make it into the fast-back cache? - - mDummyJavaPluginOwner->Destroy(); - mDummyJavaPluginOwner = nsnull; - mDidInitJavaProperties = false; - } - CleanupCachedXBLHandlers(this); #ifdef DEBUG @@ -1500,9 +1299,6 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsGlobalWindow) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mDocument) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mFrameElement) - // Traverse mDummyJavaPluginOwner - NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mDummyJavaPluginOwner) - NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mFocusedNode) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMARRAY(mPendingStorageEvents) @@ -1538,13 +1334,6 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDocument) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mFrameElement) - // Unlink mDummyJavaPluginOwner - if (tmp->mDummyJavaPluginOwner) { - tmp->mDummyJavaPluginOwner->Destroy(); - NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDummyJavaPluginOwner) - tmp->mDidInitJavaProperties = false; - } - NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mFocusedNode) NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMARRAY(mPendingStorageEvents) @@ -2297,16 +2086,6 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument, // XXXmarkh - tell other languages about this? ::JS_DeleteProperty(cx, currentInner->mJSObject, "document"); - - if (mDummyJavaPluginOwner) { - // Since we're reusing the inner window, tear down the - // dummy Java plugin we created for the old document in - // this window. - mDummyJavaPluginOwner->Destroy(); - mDummyJavaPluginOwner = nsnull; - - mDidInitJavaProperties = false; - } } } else { rv = newInnerWindow->InnerSetNewDocument(aDocument); @@ -6925,56 +6704,6 @@ nsGlobalWindow::NotifyDOMWindowThawed(nsGlobalWindow* aWindow) { } } -void -nsGlobalWindow::InitJavaProperties() -{ - nsIScriptContext *scx = GetContextInternal(); - - if (mDidInitJavaProperties || IsOuterWindow() || !scx || !mJSObject) { - return; - } - - // Set mDidInitJavaProperties to true here even if initialization - // can fail. If it fails, we won't try again... - mDidInitJavaProperties = true; - - mDummyJavaPluginOwner = new nsDummyJavaPluginOwner(mDoc); - if (!mDummyJavaPluginOwner) { - return; - } - - nsCOMPtr pluginHostCOM(do_GetService(MOZ_PLUGIN_HOST_CONTRACTID)); - nsPluginHost *pluginHost = static_cast(pluginHostCOM.get()); - if (!pluginHost) { - return; - } - pluginHost->InstantiateDummyJavaPlugin(mDummyJavaPluginOwner); - - // It's possible for us (or the Java plugin, rather) to process - // events during the above call, which can lead to this window being - // torn down or what not, so re-check that the dummy plugin is still - // around. - if (!mDummyJavaPluginOwner) { - return; - } - - nsRefPtr dummyPlugin; - mDummyJavaPluginOwner->GetInstance(getter_AddRefs(dummyPlugin)); - - if (dummyPlugin) { - // A dummy plugin was instantiated. This means we have a Java - // plugin that supports NPRuntime. For such a plugin, the plugin - // instantiation code defines the Java properties for us, so we're - // done here. - - return; - } - - // No NPRuntime enabled Java plugin found, null out the owner we - // would have used in that case as it's no longer needed. - mDummyJavaPluginOwner = nsnull; -} - JSObject* nsGlobalWindow::GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) { diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index fcc0cad79794..d2d272fe8d97 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -130,7 +130,6 @@ class nsIDocShellLoadInfo; class WindowStateHolder; class nsGlobalWindowObserver; class nsGlobalWindow; -class nsDummyJavaPluginOwner; class PostMessageEvent; class nsRunnable; class nsDOMEventTargetHelper; @@ -493,8 +492,6 @@ public: NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsGlobalWindow, nsIScriptGlobalObject) - void InitJavaProperties(); - virtual NS_HIDDEN_(JSObject*) GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey); @@ -825,10 +822,6 @@ protected: // where we don't want to force creation of a new inner window since // we're in the middle of doing just that. bool mIsFrozen : 1; - - // True if the Java properties have been initialized on this - // window. Only used on inner windows. - bool mDidInitJavaProperties : 1; // These members are only used on outer window objects. Make sure // you never set any of these on an inner object! @@ -929,10 +922,6 @@ protected: nsRefPtr mLocation; nsRefPtr mHistory; - // Holder of the dummy java plugin, used to expose window.java and - // window.packages. - nsRefPtr mDummyJavaPluginOwner; - // These member variables are used on both inner and the outer windows. nsCOMPtr mDocumentPrincipal; nsCOMPtr mDoc; // For fast access to principals diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index e7faf252e00b..87310565c335 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -80,8 +80,8 @@ class nsIArray; class nsPIWindowRoot; #define NS_PIDOMWINDOW_IID \ -{ 0x9aef58e9, 0x5225, 0x4e58, \ - { 0x9a, 0xfb, 0xe6, 0x63, 0x97, 0x1d, 0x86, 0x88 } } +{ 0x7a6238d4, 0x7cbc, 0x43b2, \ + { 0x86, 0x68, 0x92, 0xeb, 0x9e, 0xb0, 0x49, 0xaf } } class nsPIDOMWindow : public nsIDOMWindowInternal { @@ -486,12 +486,7 @@ public: void SetHasMouseEnterLeaveEventListeners() { mMayHaveMouseEnterLeaveEventListener = true; - } - - /** - * Initialize window.java and window.Packages. - */ - virtual void InitJavaProperties() = 0; + } virtual JSObject* GetCachedXBLPrototypeHandler(nsXBLPrototypeHandler* aKey) = 0; virtual void CacheXBLPrototypeHandler(nsXBLPrototypeHandler* aKey, diff --git a/dom/plugins/base/nsNPAPIPluginInstance.cpp b/dom/plugins/base/nsNPAPIPluginInstance.cpp index 6400042c72de..18a4417af727 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.cpp +++ b/dom/plugins/base/nsNPAPIPluginInstance.cpp @@ -835,63 +835,6 @@ nsNPAPIPluginInstance::GetJSObject(JSContext *cx, JSObject** outObject) return NS_OK; } -nsresult -nsNPAPIPluginInstance::DefineJavaProperties() -{ - NPObject *plugin_obj = nsnull; - - // The dummy Java plugin's scriptable object is what we want to - // expose as window.Packages. And Window.Packages.java will be - // exposed as window.java. - - // Get the scriptable plugin object. - nsresult rv = GetValueFromPlugin(NPPVpluginScriptableNPObject, &plugin_obj); - - if (NS_FAILED(rv) || !plugin_obj) { - return NS_ERROR_FAILURE; - } - - // Get the NPObject wrapper for window. - NPObject *window_obj = _getwindowobject(&mNPP); - - if (!window_obj) { - _releaseobject(plugin_obj); - - return NS_ERROR_FAILURE; - } - - NPIdentifier java_id = _getstringidentifier("java"); - NPIdentifier packages_id = _getstringidentifier("Packages"); - - NPObject *java_obj = nsnull; - NPVariant v; - OBJECT_TO_NPVARIANT(plugin_obj, v); - - // Define the properties. - - bool ok = _setproperty(&mNPP, window_obj, packages_id, &v); - if (ok) { - ok = _getproperty(&mNPP, plugin_obj, java_id, &v); - - if (ok && NPVARIANT_IS_OBJECT(v)) { - // Set java_obj so that we properly release it at the end of - // this function. - java_obj = NPVARIANT_TO_OBJECT(v); - - ok = _setproperty(&mNPP, window_obj, java_id, &v); - } - } - - _releaseobject(window_obj); - _releaseobject(plugin_obj); - _releaseobject(java_obj); - - if (!ok) - return NS_ERROR_FAILURE; - - return NS_OK; -} - nsresult nsNPAPIPluginInstance::SetCached(bool aCache) { diff --git a/dom/plugins/base/nsNPAPIPluginInstance.h b/dom/plugins/base/nsNPAPIPluginInstance.h index 1bf381b0808a..31164803b1f1 100644 --- a/dom/plugins/base/nsNPAPIPluginInstance.h +++ b/dom/plugins/base/nsNPAPIPluginInstance.h @@ -108,7 +108,6 @@ public: nsresult GetDrawingModel(PRInt32* aModel); nsresult IsRemoteDrawingCoreAnimation(bool* aDrawing); nsresult GetJSObject(JSContext *cx, JSObject** outObject); - nsresult DefineJavaProperties(); bool ShouldCache(); nsresult IsWindowless(bool* isWindowless); nsresult AsyncSetWindow(NPWindow* window); diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 2a0573168cbe..a81e8b54d0fc 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -2553,7 +2553,7 @@ nsPluginHost::WritePluginInfo() (tag->mName.get()), PLUGIN_REGISTRY_FIELD_DELIMITER, PLUGIN_REGISTRY_END_OF_LINE_MARKER, - tag->mMimeTypes.Length() + (tag->mIsNPRuntimeEnabledJavaPlugin ? 1 : 0)); + tag->mMimeTypes.Length() + 1); // Add in each mimetype this plugin supports for (PRUint32 i = 0; i < tag->mMimeTypes.Length(); i++) { @@ -2568,17 +2568,17 @@ nsPluginHost::WritePluginInfo() PLUGIN_REGISTRY_END_OF_LINE_MARKER); } - if (tag->mIsNPRuntimeEnabledJavaPlugin) { - PR_fprintf(fd, "%d%c%s%c%s%c%s%c%c\n", - tag->mMimeTypes.Length(), PLUGIN_REGISTRY_FIELD_DELIMITER, - "application/x-java-vm-npruntime", - PLUGIN_REGISTRY_FIELD_DELIMITER, - "", - PLUGIN_REGISTRY_FIELD_DELIMITER, - "", - PLUGIN_REGISTRY_FIELD_DELIMITER, - PLUGIN_REGISTRY_END_OF_LINE_MARKER); - } + // This used to depend on whether or not we had an npruntime-enabled + // Java plugin but we don't care any more, we just assume we do. + PR_fprintf(fd, "%d%c%s%c%s%c%s%c%c\n", + tag->mMimeTypes.Length(), PLUGIN_REGISTRY_FIELD_DELIMITER, + "application/x-java-vm-npruntime", + PLUGIN_REGISTRY_FIELD_DELIMITER, + "", + PLUGIN_REGISTRY_FIELD_DELIMITER, + "", + PLUGIN_REGISTRY_FIELD_DELIMITER, + PLUGIN_REGISTRY_END_OF_LINE_MARKER); } } @@ -3666,33 +3666,6 @@ nsPluginHost::NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow) return PLUG_NewPluginNativeWindow(aPluginNativeWindow); } -nsresult -nsPluginHost::InstantiateDummyJavaPlugin(nsIPluginInstanceOwner *aOwner) -{ - // Pass false as the second arg, we want the answer to be the - // same here whether the Java plugin is enabled or not. - nsPluginTag *plugin = FindPluginForType("application/x-java-vm", false); - - if (!plugin || !plugin->mIsNPRuntimeEnabledJavaPlugin) { - // No NPRuntime enabled Java plugin found, no point in - // instantiating a dummy plugin then. - - return NS_OK; - } - - nsresult rv = SetUpPluginInstance("application/x-java-vm", nsnull, aOwner); - NS_ENSURE_SUCCESS(rv, rv); - - nsRefPtr instance; - aOwner->GetInstance(getter_AddRefs(instance)); - if (!instance) - return NS_OK; - - instance->DefineJavaProperties(); - - return NS_OK; -} - nsresult nsPluginHost::GetPluginName(nsNPAPIPluginInstance *aPluginInstance, const char** aPluginName) diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h index 2b0838027f0d..1c848a291eb1 100644 --- a/dom/plugins/base/nsPluginHost.h +++ b/dom/plugins/base/nsPluginHost.h @@ -148,7 +148,6 @@ public: char **outPostData, PRUint32 *outPostDataLen); nsresult CreateTempFileToPost(const char *aPostDataURL, nsIFile **aTmpFile); nsresult NewPluginNativeWindow(nsPluginNativeWindow ** aPluginNativeWindow); - nsresult InstantiateDummyJavaPlugin(nsIPluginInstanceOwner *aOwner); void AddIdleTimeTarget(nsIPluginInstanceOwner* objectFrame, bool isVisible); void RemoveIdleTimeTarget(nsIPluginInstanceOwner* objectFrame); diff --git a/dom/plugins/base/nsPluginTags.cpp b/dom/plugins/base/nsPluginTags.cpp index f8d8050be09e..3b7e060fb9bb 100644 --- a/dom/plugins/base/nsPluginTags.cpp +++ b/dom/plugins/base/nsPluginTags.cpp @@ -81,7 +81,6 @@ mMimeDescriptions(aPluginTag->mMimeDescriptions), mExtensions(aPluginTag->mExtensions), mLibrary(nsnull), mIsJavaPlugin(aPluginTag->mIsJavaPlugin), -mIsNPRuntimeEnabledJavaPlugin(aPluginTag->mIsNPRuntimeEnabledJavaPlugin), mIsFlashPlugin(aPluginTag->mIsFlashPlugin), mFileName(aPluginTag->mFileName), mFullPath(aPluginTag->mFullPath), @@ -97,7 +96,6 @@ mName(aPluginInfo->fName), mDescription(aPluginInfo->fDescription), mLibrary(nsnull), mIsJavaPlugin(false), -mIsNPRuntimeEnabledJavaPlugin(false), mIsFlashPlugin(false), mFileName(aPluginInfo->fFileName), mFullPath(aPluginInfo->fFullPath), @@ -128,7 +126,6 @@ mName(aName), mDescription(aDescription), mLibrary(nsnull), mIsJavaPlugin(false), -mIsNPRuntimeEnabledJavaPlugin(false), mIsFlashPlugin(false), mFileName(aFileName), mFullPath(aFullPath), @@ -163,13 +160,14 @@ void nsPluginTag::InitMime(const char* const* aMimeTypes, } // If we already marked this as a Java plugin, a later MIME type will tell - // us if it is npruntime-enabled. + // us if it is npruntime-enabled. We don't actually care any more because we + // don't support Java access via the "java" and "packages" DOM objects, so + // we don't save the value, but we skip the MIME type. if (mIsJavaPlugin) { if (strcmp(aMimeTypes[i], "application/x-java-vm-npruntime") == 0) { // This "magic MIME type" should not be exposed, but is just a signal // to the browser that this is new-style java. // Don't add it or its associated information to our arrays. - mIsNPRuntimeEnabledJavaPlugin = true; continue; } } diff --git a/dom/plugins/base/nsPluginTags.h b/dom/plugins/base/nsPluginTags.h index b166d21ff7f8..81f1bb23f23a 100644 --- a/dom/plugins/base/nsPluginTags.h +++ b/dom/plugins/base/nsPluginTags.h @@ -110,7 +110,6 @@ public: PRLibrary *mLibrary; nsRefPtr mPlugin; bool mIsJavaPlugin; - bool mIsNPRuntimeEnabledJavaPlugin; bool mIsFlashPlugin; nsCString mFileName; // UTF-8 nsCString mFullPath; // UTF-8