mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1218454 - part 1 - move DialogValueHolder::Get out-of-line; r=bz
No reason for one ::Get to be out-of-line and the other not. This change means that nsGlobalWindow.h doesn't depend on nsContentUtils.
This commit is contained in:
parent
6ed09b1c32
commit
21615e6ac9
@ -584,6 +584,20 @@ DialogValueHolder::Get(nsIPrincipal* aSubject, nsIVariant** aResult)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
DialogValueHolder::Get(JSContext* aCx, JS::Handle<JSObject*> aScope,
|
||||
nsIPrincipal* aSubject,
|
||||
JS::MutableHandle<JS::Value> aResult,
|
||||
mozilla::ErrorResult& aError)
|
||||
{
|
||||
if (aSubject->Subsumes(mOrigin)) {
|
||||
aError = nsContentUtils::XPConnect()->VariantToJS(aCx, aScope,
|
||||
mValue, aResult);
|
||||
} else {
|
||||
aResult.setUndefined();
|
||||
}
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
extern uint64_t
|
||||
|
@ -267,15 +267,7 @@ public:
|
||||
, mValue(aValue) {}
|
||||
nsresult Get(nsIPrincipal* aSubject, nsIVariant** aResult);
|
||||
void Get(JSContext* aCx, JS::Handle<JSObject*> aScope, nsIPrincipal* aSubject,
|
||||
JS::MutableHandle<JS::Value> aResult, mozilla::ErrorResult& aError)
|
||||
{
|
||||
if (aSubject->Subsumes(mOrigin)) {
|
||||
aError = nsContentUtils::XPConnect()->VariantToJS(aCx, aScope,
|
||||
mValue, aResult);
|
||||
} else {
|
||||
aResult.setUndefined();
|
||||
}
|
||||
}
|
||||
JS::MutableHandle<JS::Value> aResult, mozilla::ErrorResult& aError);
|
||||
private:
|
||||
virtual ~DialogValueHolder() {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user