Skip to content

Commit 14bcecc

Browse files
committed
Bug 1330138 - Divide U2F and WebAuthn into separate directories; r=jcj
MozReview-Commit-ID: FCCSL6XWhTf --HG-- rename : dom/u2f/NSSU2FTokenRemote.cpp => dom/webauthn/NSSU2FTokenRemote.cpp rename : dom/u2f/NSSU2FTokenRemote.h => dom/webauthn/NSSU2FTokenRemote.h rename : dom/u2f/ScopedCredential.cpp => dom/webauthn/ScopedCredential.cpp rename : dom/u2f/ScopedCredential.h => dom/webauthn/ScopedCredential.h rename : dom/u2f/ScopedCredentialInfo.cpp => dom/webauthn/ScopedCredentialInfo.cpp rename : dom/u2f/ScopedCredentialInfo.h => dom/webauthn/ScopedCredentialInfo.h rename : dom/u2f/WebAuthnAssertion.cpp => dom/webauthn/WebAuthnAssertion.cpp rename : dom/u2f/WebAuthnAssertion.h => dom/webauthn/WebAuthnAssertion.h rename : dom/u2f/WebAuthnAttestation.cpp => dom/webauthn/WebAuthnAttestation.cpp rename : dom/u2f/WebAuthnAttestation.h => dom/webauthn/WebAuthnAttestation.h rename : dom/u2f/tests/test_webauthn_get_assertion.html => dom/webauthn/tests/test_webauthn_get_assertion.html rename : dom/u2f/tests/test_webauthn_loopback.html => dom/webauthn/tests/test_webauthn_loopback.html rename : dom/u2f/tests/test_webauthn_make_credential.html => dom/webauthn/tests/test_webauthn_make_credential.html rename : dom/u2f/tests/test_webauthn_no_token.html => dom/webauthn/tests/test_webauthn_no_token.html rename : dom/u2f/tests/test_webauthn_sameorigin.html => dom/webauthn/tests/test_webauthn_sameorigin.html
1 parent 4fca259 commit 14bcecc

31 files changed

+16475
-42
lines changed

dom/moz.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ DIRS += [
8585
'promise',
8686
'smil',
8787
'url',
88+
'webauthn',
8889
'webidl',
8990
'xbl',
9091
'xml',

dom/u2f/U2F.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(U2F)
4242

4343
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(U2F, mParent)
4444

45-
static mozilla::LazyLogModule gWebauthLog("webauth_u2f");
45+
static mozilla::LazyLogModule gU2FLog("u2f");
4646

4747
static nsresult
4848
AssembleClientData(const nsAString& aOrigin, const nsAString& aTyp,
@@ -81,7 +81,7 @@ U2FStatus::WaitGroupAdd()
8181
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
8282

8383
mCount += 1;
84-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
84+
MOZ_LOG(gU2FLog, LogLevel::Debug,
8585
("U2FStatus::WaitGroupAdd, now %d", mCount));
8686
}
8787

@@ -92,7 +92,7 @@ U2FStatus::WaitGroupDone()
9292

9393
MOZ_ASSERT(mCount > 0);
9494
mCount -= 1;
95-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
95+
MOZ_LOG(gU2FLog, LogLevel::Debug,
9696
("U2FStatus::WaitGroupDone, now %d", mCount));
9797
if (mCount == 0) {
9898
mReentrantMonitor.NotifyAll();
@@ -103,15 +103,15 @@ void
103103
U2FStatus::WaitGroupWait()
104104
{
105105
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
106-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
106+
MOZ_LOG(gU2FLog, LogLevel::Debug,
107107
("U2FStatus::WaitGroupWait, now %d", mCount));
108108

109109
while (mCount > 0) {
110110
mReentrantMonitor.Wait();
111111
}
112112

113113
MOZ_ASSERT(mCount == 0);
114-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
114+
MOZ_LOG(gU2FLog, LogLevel::Debug,
115115
("U2FStatus::Wait completed, now count=%d stopped=%d", mCount,
116116
mIsStopped));
117117
}
@@ -627,7 +627,7 @@ U2FRegisterRunnable::Run()
627627
U2FPrepPromise::All(AbstractThread::MainThread(), prepPromiseList)
628628
->Then(AbstractThread::MainThread(), __func__,
629629
[status] (const nsTArray<Authenticator>& aTokens) {
630-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
630+
MOZ_LOG(gU2FLog, LogLevel::Debug,
631631
("ALL: None of the RegisteredKeys were recognized. n=%d",
632632
aTokens.Length()));
633633

@@ -784,7 +784,7 @@ U2FSignRunnable::U2FSignRunnable(const nsAString& aOrigin,
784784
nsresult rv = AssembleClientData(aOrigin, kGetAssertion, aChallenge,
785785
mClientData);
786786
if (NS_WARN_IF(NS_FAILED(rv))) {
787-
MOZ_LOG(gWebauthLog, LogLevel::Warning,
787+
MOZ_LOG(gU2FLog, LogLevel::Warning,
788788
("Failed to AssembleClientData for the U2FSignRunnable."));
789789
return;
790790
}
@@ -976,15 +976,15 @@ U2F::Init(nsPIDOMWindowInner* aParent, ErrorResult& aRv)
976976
}
977977

978978
if (!EnsureNSSInitializedChromeOrContent()) {
979-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
979+
MOZ_LOG(gU2FLog, LogLevel::Debug,
980980
("Failed to get NSS context for U2F"));
981981
aRv.Throw(NS_ERROR_FAILURE);
982982
return;
983983
}
984984

985985
// This only functions in e10s mode
986986
if (XRE_IsParentProcess()) {
987-
MOZ_LOG(gWebauthLog, LogLevel::Debug,
987+
MOZ_LOG(gU2FLog, LogLevel::Debug,
988988
("Is non-e10s Process, U2F not available"));
989989
aRv.Throw(NS_ERROR_FAILURE);
990990
return;

dom/u2f/moz.build

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,14 @@
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

77
EXPORTS.mozilla.dom += [
8-
'NSSU2FTokenRemote.h',
9-
'ScopedCredential.h',
10-
'ScopedCredentialInfo.h',
118
'U2F.h',
129
'U2FAuthenticator.h',
1310
'USBToken.h',
14-
'WebAuthentication.h',
15-
'WebAuthnAssertion.h',
16-
'WebAuthnAttestation.h',
17-
'WebAuthnRequest.h',
1811
]
1912

2013
UNIFIED_SOURCES += [
21-
'NSSU2FTokenRemote.cpp',
22-
'ScopedCredential.cpp',
23-
'ScopedCredentialInfo.cpp',
2414
'U2F.cpp',
2515
'USBToken.cpp',
26-
'WebAuthentication.cpp',
27-
'WebAuthnAssertion.cpp',
28-
'WebAuthnAttestation.cpp',
2916
]
3017

3118
include('/ipc/chromium/chromium-config.mozbuild')

dom/u2f/tests/mochitest.ini

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,3 @@ skip-if = !e10s
2727
skip-if = !e10s
2828
[test_appid_facet_subdomain.html]
2929
skip-if = !e10s
30-
[test_webauthn_loopback.html]
31-
skip-if = !e10s
32-
scheme = https
33-
[test_webauthn_no_token.html]
34-
skip-if = !e10s
35-
scheme = https
36-
[test_webauthn_make_credential.html]
37-
skip-if = !e10s
38-
scheme = https
39-
[test_webauthn_get_assertion.html]
40-
skip-if = !e10s
41-
scheme = https
42-
[test_webauthn_sameorigin.html]
43-
skip-if = !e10s
44-
scheme = https
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)