mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1132655. Don't allow conversions from DOMString to const XPCOM string references, since it's meant to be an outparam only. r=smaug
This commit is contained in:
parent
c1347d4d64
commit
4c68880cf9
@ -55,6 +55,11 @@ public:
|
||||
return AsAString();
|
||||
}
|
||||
|
||||
// It doesn't make any sense to convert a DOMString to a const nsString or
|
||||
// nsAString reference; this class is meant for outparams only.
|
||||
operator const nsString&() = delete;
|
||||
operator const nsAString&() = delete;
|
||||
|
||||
nsString& AsAString()
|
||||
{
|
||||
MOZ_ASSERT(!mStringBuffer, "We already have a stringbuffer?");
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
{
|
||||
DOMString value;
|
||||
GetSrc(value);
|
||||
aText = value;
|
||||
value.ToString(aText);
|
||||
}
|
||||
virtual void SetItemValueText(const nsAString& aText) MOZ_OVERRIDE
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ ServiceWorkerClients::GetServiced(ErrorResult& aRv)
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
workerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
DOMString scope;
|
||||
nsString scope;
|
||||
mWorkerScope->GetScope(scope);
|
||||
|
||||
nsRefPtr<Promise> promise = Promise::Create(mWorkerScope, aRv);
|
||||
|
@ -203,9 +203,9 @@ public:
|
||||
JS::MutableHandle<JSObject*> aReflector) MOZ_OVERRIDE;
|
||||
|
||||
void
|
||||
GetScope(DOMString& aScope) const
|
||||
GetScope(nsString& aScope) const
|
||||
{
|
||||
aScope.AsAString() = mScope;
|
||||
aScope = mScope;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user