Land DOM_AGNOSTIC3_BRANCH, bug 255942. r=a few people, sr=brendan.

git-svn-id: svn://10.0.0.236/trunk@199778 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mhammond%skippinet.com.au
2006-06-13 03:07:47 +00:00
parent 539e487f5d
commit e96b5e495a
71 changed files with 4446 additions and 2060 deletions

View File

@@ -97,6 +97,7 @@
#include "nsIWritablePropertyBag2.h"
#include "nsIAppShell.h"
#include "nsWidgetsCID.h"
#include "nsDOMJSUtils.h"
// we want to explore making the document own the load group
// so we can associate the document URI with the load group.
@@ -8320,13 +8321,12 @@ nsDocShell::EnsureScriptEnvironment()
SetGlobalObjectOwner(NS_STATIC_CAST
(nsIScriptGlobalObjectOwner *, this));
nsCOMPtr<nsIScriptContext> context;
factory->NewScriptContext(mScriptGlobal, getter_AddRefs(context));
NS_ENSURE_TRUE(context, NS_ERROR_FAILURE);
// Note that mScriptGlobal has taken a reference to the script
// context, so we don't have to.
// Ensure the script object is set to run javascript - other languages
// setup on demand.
// XXXmarkh - should this be setup to run the default language for this doc?
nsresult rv;
rv = mScriptGlobal->EnsureScriptEnvironment(nsIProgrammingLanguage::JAVASCRIPT);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}