Backed out 7 changesets (bug 406541, bug 738396, bug 852315, bug 971273, bug 971279) for various java/plugin-related failures on a CLOSED TREE

Backed out changeset 13cc8a7ee925 (bug 852315)
Backed out changeset 23dfc36f99d4 (bug 852315)
Backed out changeset fb56bd7c0feb (bug 406541)
Backed out changeset b24d1437c6f3 (bug 738396)
Backed out changeset 5028e1290b45 (bug 971279)
Backed out changeset 34ecdab0cfc2 (bug 971279)
Backed out changeset 95b4aa01923d (bug 971273)
This commit is contained in:
Wes Kocher 2014-02-20 16:19:30 -08:00
parent 6ec87044ea
commit 6246833818
22 changed files with 42 additions and 511 deletions

View File

@ -32,9 +32,14 @@ var gPluginHandler = {
let fallbackType = null;
let blocklistState = null;
tagMimetype = pluginElement.actualType;
if (tagMimetype == "") {
tagMimetype = pluginElement.type;
if (pluginElement instanceof HTMLAppletElement) {
tagMimetype = "application/x-java-vm";
} else {
tagMimetype = pluginElement.actualType;
if (tagMimetype == "") {
tagMimetype = pluginElement.type;
}
}
if (gPluginHandler.isKnownPlugin(pluginElement)) {

View File

@ -92,8 +92,6 @@
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
static const char *kPrefJavaMIME = "plugin.java.mime";
using namespace mozilla;
using namespace mozilla::dom;
@ -904,8 +902,6 @@ nsObjectLoadingContent::InstantiatePluginInstance(bool aIsLoading)
void
nsObjectLoadingContent::NotifyOwnerDocumentActivityChanged()
{
// XXX(johns): We cannot touch plugins or run arbitrary script from this call,
// as nsDocument is in a non-reentrant state.
// If we have a plugin we want to queue an event to stop it unless we are
// moved into an active document before returning to the event loop.
@ -1414,12 +1410,8 @@ nsObjectLoadingContent::UpdateObjectParameters(bool aJavaURI)
///
/// Initial MIME Type
///
if (aJavaURI || thisContent->NodeInfo()->Equals(nsGkAtoms::applet)) {
nsAdoptingCString javaMIME = Preferences::GetCString(kPrefJavaMIME);
newMime = javaMIME;
NS_ASSERTION(nsPluginHost::IsJavaMIMEType(newMime.get()),
"plugin.mime.java should be recognized by IsJavaMIMEType");
newMime.AssignLiteral("application/x-java-vm");
isJava = true;
} else {
nsAutoString rawTypeAttr;
@ -1440,12 +1432,9 @@ nsObjectLoadingContent::UpdateObjectParameters(bool aJavaURI)
thisContent->GetAttr(kNameSpaceID_None, nsGkAtoms::classid, classIDAttr);
if (!classIDAttr.IsEmpty()) {
// Our classid support is limited to 'java:' ids
nsAdoptingCString javaMIME = Preferences::GetCString(kPrefJavaMIME);
NS_ASSERTION(nsPluginHost::IsJavaMIMEType(newMime.get()),
"plugin.mime.java should be recognized by IsJavaMIMEType");
if (StringBeginsWith(classIDAttr, NS_LITERAL_STRING("java:")) &&
PluginExistsForType(javaMIME)) {
newMime = javaMIME;
PluginExistsForType("application/x-java-vm")) {
newMime.Assign("application/x-java-vm");
isJava = true;
} else {
// XXX(johns): Our de-facto behavior since forever was to refuse to load

View File

@ -194,6 +194,19 @@ private:
*/
NS_HIDDEN_(void) StartObjectLoad(bool aNotify);
void GetTypeAttrValue(nsCString &aValue) const
{
if (mNodeInfo->Equals(nsGkAtoms::applet)) {
aValue.AppendLiteral("application/x-java-vm");
}
else {
nsAutoString type;
GetAttr(kNameSpaceID_None, nsGkAtoms::type, type);
CopyUTF16toUTF8(type, aValue);
}
}
nsIAtom *URIAttrName() const
{
return mNodeInfo->Equals(nsGkAtoms::applet) ?

View File

@ -576,11 +576,8 @@ bool
Navigator::JavaEnabled(ErrorResult& aRv)
{
Telemetry::AutoTimer<Telemetry::CHECK_JAVA_ENABLED> telemetryTimer;
// Return true if we have a handler for the java mime
nsAdoptingString javaMIME = Preferences::GetString("plugin.java.mime");
NS_ENSURE_TRUE(!javaMIME.IsEmpty(), false);
// Return true if we have a handler for "application/x-java-vm",
// otherwise return false.
if (!mMimeTypes) {
if (!mWindow) {
aRv.Throw(NS_ERROR_UNEXPECTED);
@ -591,7 +588,8 @@ Navigator::JavaEnabled(ErrorResult& aRv)
RefreshMIMEArray();
nsMimeType *mimeType = mMimeTypes->NamedItem(javaMIME);
nsMimeType *mimeType =
mMimeTypes->NamedItem(NS_LITERAL_STRING("application/x-java-vm"));
return mimeType && mimeType->GetEnabledPlugin();
}

View File

@ -124,7 +124,6 @@ using mozilla::TimeStamp;
static const char *kPrefWhitelist = "plugin.allowed_types";
static const char *kPrefDisableFullPage = "plugin.disable_full_page_plugin_for_types";
static const char *kPrefJavaMIME = "plugin.java.mime";
// Version of cached plugin info
// 0.01 first implementation
@ -1556,23 +1555,13 @@ nsPluginHost::SiteHasData(nsIPluginTag* plugin, const nsACString& domain,
bool nsPluginHost::IsJavaMIMEType(const char* aType)
{
// The java mime pref may well not be one of these,
// e.g. application/x-java-test used in the test suite
nsAdoptingCString javaMIME = Preferences::GetCString(kPrefJavaMIME);
return aType &&
(javaMIME.LowerCaseEqualsASCII(aType) ||
(0 == PL_strncasecmp(aType, "application/x-java-vm",
((0 == PL_strncasecmp(aType, "application/x-java-vm",
sizeof("application/x-java-vm") - 1)) ||
(0 == PL_strncasecmp(aType, "application/x-java-applet",
sizeof("application/x-java-applet") - 1)) ||
(0 == PL_strncasecmp(aType, "application/x-java-bean",
sizeof("application/x-java-bean") - 1))
#ifdef DEBUG
// Emulate java handling for the npjavatest plugin
|| (0 == PL_strncasecmp(aType, "application/x-java-test",
sizeof("application/x-java-test") - 1))
#endif
);
sizeof("application/x-java-bean") - 1)));
}
// Check whether or not a tag is a live, valid tag, and that it's loaded.

View File

@ -1,87 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Helper for test_bug738396.html</title>
<meta charset="utf-8">
</head>
<body>
<!-- Test that the plugin sees "good" in each of these cases -->
<div id="codebasevis">
<applet codebase="good" codebase="bad" ></applet>
<applet codebase="bad">
<param name="codebase" value="good">
</applet>
<applet codebase="bad">
<param name="codebase" value="stillbad">
<param name="codebase" value="good">
</applet>
<applet>
<param name="codebase" value="good">
</applet>
<object type="application/x-java-test" codebase="good" codebase="bad"></object>
<object type="application/x-java-test" codebase="bad">
<param name="codebase" value="good">
</object>
<object type="application/x-java-test" codebase="bad">
<param name="codebase" value="stillbad">
<param name="codebase" value="good">
</object>
<object type="application/x-java-test">
<param name="codebase" value="good">
</object>
<embed type="application/x-java-test" codebase="good" codebase="bad">
</div>
<div id="blockedcodebase">
<!-- Test that none of these are allowed to load -->
<applet codebase="file:///" codebase="notused"></applet>
<applet codebase="notused">
<param name="codebase" value="file:///">
</applet>
<applet codebase="notused">
<param name="codebase" value="notused">
<param name="codebase" value="file:///">
</applet>
<applet>
<param name="codebase" value="file:///">
</applet>
<object type="application/x-java-test" codebase="file:///" codebase="notused"></object>
<object type="application/x-java-test" codebase="notused">
<param name="codebase" value="file:///">
</object>
<object type="application/x-java-test" codebase="notused">
<param name="codebase" value="notused">
<param name="codebase" value="file:///">
</object>
<object type="application/x-java-test">
<param name="codebase" value="file:///">
</object>
<embed type="application/x-java-test" codebase="file:///" codebase="notused">
</div>
<div id="nocodebase">
<applet></applet>
<object type="application/x-java-test"></object>
<embed type="application/x-java-test">
</div>
<div id="emptycodebase">
<applet codebase=""></applet>
<object type="application/x-java-test" codebase=""></object>
<embed type="application/x-java-test" codebase="">
</div>
</body>
</html>

View File

@ -2,7 +2,6 @@
support-files =
307-xo-redirect.sjs
crashing_subpage.html
file_bug738396.html
file_bug771202.html
file_bug863792.html
large-pic.jpg
@ -24,16 +23,13 @@ support-files =
[test_GCrace.html]
[test_NPNVdocumentOrigin.html]
[test_NPPVpluginWantsAllNetworkStreams.html]
[test_bug406541.html]
[test_bug532208.html]
[test_bug539565-1.html]
[test_bug539565-2.html]
[test_bug738396.html]
[test_bug771202.html]
[test_bug777098.html]
[test_bug784131.html]
[test_bug813906.html]
[test_bug852315.html]
[test_bug854082.html]
[test_bug863792.html]
[test_bug967694.html]

View File

@ -1,100 +0,0 @@
<!doctype html>
<html>
<head>
<title>Test for Bug 406541</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="utils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script type="application/x-child-payload" id="child-payload">
// This is injected into the file:/// origin iframe, see below.
// appletA should spawn, appletB, with a codebase outside the temp directory,
// should not.
var appletA = document.createElement("applet");
var appletB = document.createElement("applet");
var appletC = document.createElement("applet");
appletA.type = appletB.type = appletC.type = "application/x-java-test";
appletB.setAttribute("codebase", "file:///");
appletC.setAttribute("codebase", "./subdir_bug406541/");
document.body.appendChild(appletA);
document.body.appendChild(appletB);
document.body.appendChild(appletC);
function isSpawned(plugin) {
try {
var x = plugin.getJavaCodebase();
return true;
} catch (e) {}
return false;
}
window.parent.postMessage({ "A": isSpawned(appletA),
"B": isSpawned(appletB),
"C": isSpawned(appletC) }, "*");
</script>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED,
"Java Test Plug-in");
SpecialPowers.pushPrefEnv({ "set": [
['plugin.java.mime', 'application/x-java-test']
] }, runTest);
function runTest() {
// Create a empty file and point an iframe at it
var Cc = SpecialPowers.Cc;
var Ci = SpecialPowers.Ci;
var file = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
.get("TmpD", Ci.nsIFile);
var subdir = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
.get("TmpD", Ci.nsIFile);
file.append("test_bug406541.html");
file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
subdir.append("subdir_bug406541");
subdir.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0600);
var i = document.createElement("iframe");
var loaded = false;
i.addEventListener("load", function initialLoad() {
if (!loaded) {
// Once loaded, use special powers to point it at the file
SpecialPowers.wrap(i.contentWindow).location.href = "file://" + file.path;
loaded = true;
} else {
// Inject the child-payload script to the file:/// origin. Let it test
// applet spawning and send the results in a postMessage. (Because I
// couldn't get SpecialPowers to let me touch applets cross-origin, then
// gave up.)
var innerdoc = SpecialPowers.wrap(i.contentWindow).document;
var s = innerdoc.createElement("script");
s.type = "text/javascript";
s.textContent = document.getElementById("child-payload").textContent;
var finished = false;
window.onmessage = function(message) {
ok(message.data.A, "Plugin A should spawn");
ok(!message.data.B, "Plugin B should NOT spawn");
ok(message.data.C, "Plugin C should spawn");
file.remove(false);
subdir.remove(false);
finished = true;
SimpleTest.finish();
};
innerdoc.body.appendChild(s);
SimpleTest.executeSoon(function() {
if (!finished) {
ok(finished, "Should have received callback by now");
SimpleTest.finish();
}
});
}
}, false);
document.body.appendChild(i);
}
</script>
</body>
</html>

View File

@ -1,88 +0,0 @@
<!doctype html>
<html>
<head>
<title>Test for Bug 738396</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="utils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<script type="text/javascript">
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED,
"Java Test Plug-in");
SpecialPowers.pushPrefEnv({ "set": [
['plugin.java.mime', 'application/x-java-test']
] }, loadFrame);
SimpleTest.waitForExplicitFinish();
function loadFrame() {
var iframe = document.createElement("iframe");
iframe.src = "./file_bug738396.html";
iframe.addEventListener("load", function() {
runTest(iframe.contentDocument);
});
document.body.appendChild(iframe);
}
function runTest(doc) {
// Check that the canonicalized version of the codebase 'good' was passed
// to the plugin in all cases
var a = doc.createElement('a');
a.href = "good";
var goodCodebase = a.href;
var codebasevis = doc.getElementById("codebasevis")
.querySelectorAll("applet, object, embed");
for (var elem of codebasevis) {
var codebase = null;
try {
codebase = elem.getJavaCodebase();
} catch (e) {}
is(codebase, goodCodebase,
"Check that the test plugin sees the proper codebase");
}
// Check that none of the applets in blockedcodebase were allowed to spawn
var blockedcodebase = doc.getElementById("blockedcodebase")
.querySelectorAll("applet, object, embed");
for (var elem of blockedcodebase) {
var spawned = false;
try {
elem.getObjectValue();
spawned = true;
} catch (e) {}
ok(!spawned, "Plugin should not be allowed to spawn");
}
// With no codebase, the codebase should resolve to "."
a.href = ".";
goodCodebase = a.href;
var nocodebase = doc.getElementById("nocodebase")
.querySelectorAll("applet, object, embed");
for (var elem of nocodebase) {
var codebase = null;
try {
codebase = elem.getJavaCodebase();
} catch (e) {}
is(codebase, goodCodebase, "Codebase should resolve to '.'");
}
// With empty codebase, the codebase should resolve to "/"
a.href = "/";
goodCodebase = a.href;
var nocodebase = doc.getElementById("emptycodebase")
.querySelectorAll("applet, object, embed");
for (var elem of nocodebase) {
var codebase = null;
try {
codebase = elem.getJavaCodebase();
} catch (e) {}
is(codebase, goodCodebase, "Codebase should resolve to '/'");
}
SimpleTest.finish();
}
</script>
</body>
</html>

View File

@ -1,49 +0,0 @@
<!doctype html>
<html>
<head>
<title>Test for Bug 852315</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="utils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<base href="chrome://browser/content/">
</head>
<body>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
// Tests that the document-inactive notification stopping plugins does not
// fatally re-enter when adding other plugins to the document.
var i = document.createElement("iframe");
var ob = document.body;
i.addEventListener("load", function loadfunc() {
var d = i.contentWindow.document;
var e = i.contentDocument.createElement("embed");
var destroyran = false;
e.type = "application/x-test";
i.contentDocument.body.appendChild(e);
// On despawn, append an embed tag to document.
e.callOnDestroy(function() {
var e2 = d.createElement("embed");
d.body.appendChild(e2);
destroyran = true;
});
// Navigate the frame to cause the document with the plugin to go inactive
i.removeEventListener("load", loadfunc);
i.src = "about:blank";
SimpleTest.executeSoon(function() {
ok(destroyran, "OnDestroy callback ran and did not crash");
SimpleTest.finish();
});
});
document.body.appendChild(i);
</script>
</body>
</html>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>libnptestjava.dylib</string>
<key>CFBundleIdentifier</key>
<string>org.mozilla.JavaTestPlugin</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0.0</string>
<key>CFBundleSignature</key>
<string>JAVATEST</string>
<key>CFBundleVersion</key>
<string>1.0.0.0</string>
<key>WebPluginName</key>
<string>Java Test Plug-in</string>
<key>WebPluginDescription</key>
<string>Dummy java plug-in for testing purposes.</string>
<key>WebPluginMIMETypes</key>
<dict>
<key>application/x-java-test</key>
<dict>
<key>WebPluginExtensions</key>
<array>
<string>tstjava</string>
</array>
<key>WebPluginTypeDescription</key>
<string>Dummy java type</string>
</dict>
</dict>
</dict>
</plist>

View File

@ -1,8 +0,0 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
RELATIVE_PATH=..
COCOA_NAME=JavaTest
include @srcdir@/../testplugin.mk

View File

@ -1,10 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
LIBRARY_NAME = 'nptestjava'
relative_path = '..'
include('../testplugin.mozbuild')

View File

@ -1,7 +0,0 @@
LIBRARY NPJAVATEST
EXPORTS
NP_GetEntryPoints @1
NP_Initialize @2
NP_Shutdown @3
NP_GetMIMEDescription @4

View File

@ -1,42 +0,0 @@
#include<winver.h>
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "mozilla.org"
VALUE "FileDescription", L"Dummy Java plug-in for testing purposes."
VALUE "FileExtents", "tstjava"
VALUE "FileOpenName", "Dummy java test type"
VALUE "FileVersion", "1.0"
VALUE "InternalName", "nptestjava"
VALUE "MIMEType", "application/x-java-test"
VALUE "OriginalFilename", "nptestjava.dll"
VALUE "ProductName", "Java Test Plug-in"
VALUE "ProductVersion", "1.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END

View File

@ -1,7 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
const char *sPluginName = "Java Test Plug-in";
const char *sPluginDescription = "Dummy Java plug-in for testing purposes.";
const char *sMimeDescription = "application/x-java-test:tstjava:Dummy java type";

View File

@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DIRS += ['secondplugin', 'javaplugin']
DIRS += ['secondplugin']
LIBRARY_NAME = 'nptest'

View File

@ -52,7 +52,6 @@
#include <float.h>
#include <windows.h>
#define getpid _getpid
#define strcasecmp _stricmp
#else
#include <unistd.h>
#include <pthread.h>
@ -140,7 +139,6 @@ static bool setPluginWantsAllStreams(NPObject* npobj, const NPVariant* args, uin
static bool crashPlugin(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool crashOnDestroy(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool getObjectValue(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool getJavaCodebase(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool checkObjectValue(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool enableFPExceptions(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
static bool setCookie(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result);
@ -204,7 +202,6 @@ static const NPUTF8* sPluginMethodIdentifierNames[] = {
"crash",
"crashOnDestroy",
"getObjectValue",
"getJavaCodebase",
"checkObjectValue",
"enableFPExceptions",
"setCookie",
@ -269,7 +266,6 @@ static const ScriptableFunction sPluginMethodFunctions[] = {
crashPlugin,
crashOnDestroy,
getObjectValue,
getJavaCodebase,
checkObjectValue,
enableFPExceptions,
setCookie,
@ -963,11 +959,6 @@ NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char*
if (strcmp(argn[i], "bugmode") == 0) {
instanceData->bugMode = atoi(argv[i]);
}
// Try to emulate java's codebase handling: Use the last seen codebase
// value, regardless of whether it is in attributes or params.
if (strcasecmp(argn[i], "codebase") == 0) {
instanceData->javaCodebase = argv[i];
}
}
if (!browserSupportsWindowless || !pluginSupportsWindowlessMode()) {
@ -2898,18 +2889,6 @@ static const NPClass kTestSharedNPClass = {
// Everything else is nullptr
};
static bool getJavaCodebase(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
{
if (argCount != 0) {
return false;
}
NPP npp = static_cast<TestNPObject*>(npobj)->npp;
InstanceData* id = static_cast<InstanceData*>(npp->pdata);
STRINGZ_TO_NPVARIANT(NPN_StrDup(id->javaCodebase.c_str()), *result);
return true;
}
static bool getObjectValue(NPObject* npobj, const NPVariant* args, uint32_t argCount, NPVariant* result)
{
NPP npp = static_cast<TestNPObject*>(npobj)->npp;

View File

@ -152,7 +152,6 @@ typedef struct InstanceData {
NPAsyncSurface *backBuffer;
int32_t mouseUpEventCount;
int32_t bugMode;
std::string javaCodebase;
} InstanceData;
void notifyDidPaint(InstanceData* instanceData);

View File

@ -136,10 +136,16 @@ var PluginHelper = {
},
getPluginMimeType: function (plugin) {
var tagMimetype = plugin.actualType;
var tagMimetype;
if (plugin instanceof HTMLAppletElement) {
tagMimetype = "application/x-java-vm";
} else {
tagMimetype = plugin.QueryInterface(Components.interfaces.nsIObjectLoadingContent)
.actualType;
if (tagMimetype == "") {
tagMimetype = plugin.type;
if (tagMimetype == "") {
tagMimetype = plugin.type;
}
}
return tagMimetype;

View File

@ -1902,11 +1902,6 @@ pref("plugins.enumerable_names", "Java,Nexus Personal,QuickTime,Shockwave");
// The default value for nsIPluginTag.enabledState (STATE_ENABLED = 2)
pref("plugin.default.state", 2);
// The MIME type that should bind to legacy java-specific invocations like
// <applet> and <object data="java:foo">. Setting this to a non-java MIME type
// is undefined behavior.
pref("plugin.java.mime", "application/x-java-vm");
// How long in minutes we will allow a plugin to work after the user has chosen
// to allow it "now"
pref("plugin.sessionPermissionNow.intervalInMinutes", 60);

View File

@ -154,13 +154,11 @@ TEST_HARNESS_COMPONENTS := \
ifeq (Darwin,$(OS_TARGET))
TEST_HARNESS_PLUGINS := \
Test.plugin/ \
SecondTest.plugin/ \
JavaTest.plugin/
SecondTest.plugin/
else
TEST_HARNESS_PLUGINS := \
$(DLL_PREFIX)nptest$(DLL_SUFFIX) \
$(DLL_PREFIX)npsecondtest$(DLL_SUFFIX) \
$(DLL_PREFIX)nptestjava$(DLL_SUFFIX)
$(DLL_PREFIX)npsecondtest$(DLL_SUFFIX)
endif
# Rules for staging the necessary harness bits for a test package