Fail if a version string is specified, so we can define the semantics later

git-svn-id: svn://10.0.0.236/branches/DOM_AGNOSTIC_BRANCH@179984 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2005-09-11 14:03:07 +00:00
parent 9f1a2fb890
commit 8db0a2b899
2 changed files with 16 additions and 4 deletions

View File

@@ -68,6 +68,20 @@ nsPythonRuntime::CreateContext(nsIScriptContext **ret)
return NS_OK;
}
nsresult
nsPythonRuntime::ParseVersion(const nsString &aVersionStr, PRUint32 *aFlags) {
// We ignore the version, but it is safer to fail whenever a version is
// specified, thereby ensuring noone will ever specify a version with
// Python, allowing future semantics to be defined without concern for
// existing behaviour.
if (aVersionStr.IsEmpty()) {
*aFlags = 0;
return NS_OK;
}
NS_ERROR("Don't specify a version for Python");
return NS_ERROR_UNEXPECTED;
}
NS_METHOD
nsPythonRuntime::RegisterSelf(nsIComponentManager* aCompMgr,
nsIFile* aPath,