-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContentChild.cpp-patch
53 lines (49 loc) · 1.81 KB
/
ContentChild.cpp-patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -53,16 +53,19 @@
#include "mozilla/net/NeckoChild.h"
#include "mozilla/plugins/PluginInstanceParent.h"
#include "mozilla/plugins/PluginModuleParent.h"
#include "mozilla/widget/WidgetMessageUtils.h"
#include "mozilla/media/MediaChild.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/WebBrowserPersistDocumentChild.h"
+#include "mozilla/dom/CredentialContainerBinding.h"
+#include "mozilla/dom/PasswordCredential.h"
+
#if defined(MOZ_CONTENT_SANDBOX)
#if defined(XP_WIN)
#define TARGET_SANDBOX_EXPORTS
#include "mozilla/sandboxTarget.h"
#elif defined(XP_LINUX)
#include "mozilla/Sandbox.h"
#include "mozilla/SandboxInfo.h"
#elif defined(XP_MACOSX)
@@ -2322,16 +2325,29 @@ ContentChild::AddRemoteAlertObserver(con
nsIObserver* aObserver)
{
NS_ASSERTION(aObserver, "Adding a null observer?");
mAlertObservers.AppendElement(new AlertObserver(aObserver, aData));
return NS_OK;
}
+bool
+ContentChild::RecvLoginsForPath(const uint64_t& aGetterId,
+ const nsString& aPrepath,
+ const nsString& aUsername,
+ const nsString& aPassword)
+{
+ RefPtr<Promise> p = dont_AddRef(reinterpret_cast<Promise*>(aGetterId));
+
+ RefPtr<PasswordCredential> pc = new PasswordCredential(p->GetParentObject(), aUsername, aPassword);
+ p->MaybeResolve(pc);
+ return true;
+}
+
bool
ContentChild::RecvSystemMemoryAvailable(const uint64_t& aGetterId,
const uint32_t& aMemoryAvailable)
{
RefPtr<Promise> p = dont_AddRef(reinterpret_cast<Promise*>(aGetterId));
if (!aMemoryAvailable) {
p->MaybeReject(NS_ERROR_NOT_AVAILABLE);