зеркало из https://github.com/mozilla/gecko-dev.git
small update to sync up with new nsString API
This commit is contained in:
Родитель
85a5f8b95e
Коммит
7fd12d5c78
|
@ -478,7 +478,7 @@ GlobalWindowImpl::SetStatus(const nsString& aStatus)
|
|||
{
|
||||
nsIBrowserWindow *mBrowser;
|
||||
if (NS_OK == GetBrowserWindowInterface(mBrowser)) {
|
||||
mBrowser->SetStatus(aStatus);
|
||||
mBrowser->SetStatus(aStatus.GetUnicode());
|
||||
NS_RELEASE(mBrowser);
|
||||
}
|
||||
return NS_OK;
|
||||
|
@ -508,7 +508,7 @@ GlobalWindowImpl::GetName(nsString& aName)
|
|||
NS_IMETHODIMP
|
||||
GlobalWindowImpl::SetName(const nsString& aName)
|
||||
{
|
||||
mWebShell->SetName(aName);
|
||||
mWebShell->SetName(aName.GetUnicode());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1486,8 +1486,8 @@ GlobalWindowImpl::Open(JSContext *cx,
|
|||
webShellContainer->NewWebShell(mChrome, PR_FALSE, newWebShell);
|
||||
}
|
||||
if (nsnull != newWebShell) {
|
||||
newWebShell->SetName(name);
|
||||
newWebShell->LoadURL(mAbsURL);
|
||||
newWebShell->SetName(name.GetUnicode());
|
||||
newWebShell->LoadURL(mAbsURL.GetUnicode());
|
||||
|
||||
if (NS_OK == newWebShell->GetContainer(newContainer) && nsnull != newContainer) {
|
||||
newContainer->QueryInterface(kIBrowserWindowIID, (void**)&newWindow);
|
||||
|
@ -1687,7 +1687,7 @@ GlobalWindowImpl::AddProperty(JSContext *aContext, jsval aID, jsval *aVp)
|
|||
nsString mPropName;
|
||||
nsAutoString mPrefix;
|
||||
mPropName.SetString(JS_GetStringChars(JS_ValueToString(aContext, aID)));
|
||||
mPrefix.SetString(mPropName, 2);
|
||||
mPrefix.SetString(mPropName.GetUnicode(), 2);
|
||||
if (mPrefix == "on") {
|
||||
return CheckForEventListener(aContext, mPropName);
|
||||
}
|
||||
|
@ -1742,7 +1742,7 @@ GlobalWindowImpl::SetProperty(JSContext *aContext, jsval aID, jsval *aVp)
|
|||
nsString mPropName;
|
||||
nsAutoString mPrefix;
|
||||
mPropName.SetString(JS_GetStringChars(JS_ValueToString(aContext, aID)));
|
||||
mPrefix.SetString(mPropName, 2);
|
||||
mPrefix.SetString(mPropName.GetUnicode(), 2);
|
||||
if (mPrefix == "on") {
|
||||
return CheckForEventListener(aContext, mPropName);
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ nsJSUtils::nsConvertStringToJSVal(const nsString& aProp,
|
|||
JSContext* aContext,
|
||||
jsval* aReturn)
|
||||
{
|
||||
JSString *jsstring = JS_NewUCStringCopyN(aContext, aProp, aProp.Length());
|
||||
JSString *jsstring = JS_NewUCStringCopyN(aContext, aProp.GetUnicode(), aProp.Length());
|
||||
// set the return value
|
||||
*aReturn = STRING_TO_JSVAL(jsstring);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ LocationImpl::SetURL(nsIURL* aURL)
|
|||
const char* spec;
|
||||
aURL->GetSpec(&spec);
|
||||
nsAutoString s = spec;
|
||||
return mWebShell->LoadURL(s, nsnull, PR_TRUE);
|
||||
return mWebShell->LoadURL(s.GetUnicode(), nsnull, PR_TRUE);
|
||||
}
|
||||
else {
|
||||
return NS_OK;
|
||||
|
@ -293,7 +293,7 @@ LocationImpl::SetHref(const nsString& aHref)
|
|||
}
|
||||
|
||||
if ((NS_OK == result) && (nsnull != mWebShell)) {
|
||||
return mWebShell->LoadURL(newHref, nsnull, PR_TRUE);
|
||||
return mWebShell->LoadURL(newHref.GetUnicode(), nsnull, PR_TRUE);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -510,7 +510,7 @@ NS_IMETHODIMP
|
|||
LocationImpl::Replace(const nsString& aUrl)
|
||||
{
|
||||
if (nsnull != mWebShell) {
|
||||
return mWebShell->LoadURL(aUrl, nsnull, PR_FALSE);
|
||||
return mWebShell->LoadURL(aUrl.GetUnicode(), nsnull, PR_FALSE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче