Closed Bug 1892017 Opened 7 months ago Closed 5 months ago

Implement Discover method for lightweight credential, integrating it with FedCM

Categories

(Core :: DOM: Credential Management, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: bvandersloot, Assigned: bvandersloot)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

No description provided.
Assignee: nobody → bvandersloot
Status: NEW → ASSIGNED

This is the content side state to hold the (guaruanteed singular) pending identity credential request that had to call out
to the main process.

Depends on D212941

These pass. But I want more, so I'll make them WIP while the code is in review.

Depends on D212946

Attachment #9406145 - Attachment description: WIP: Bug 1892017, part 6 - Add tests for LFedCM discovery - WIP → Bug 1892017, part 6 - Add tests for LFedCM discovery - r=#anti-tracking!
Priority: -- → P1
Pushed by bvandersloot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/488a043b797b part 1 - Make a string an enum in (tentative) FedCM webidl - r=anti-tracking-reviewers,webidl,smaug,timhuang https://hg.mozilla.org/integration/autoland/rev/c0824274c054 part 2 - Store a promise on the inner window's global to enable Lightweight FedCM discovery - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/727bd124c756 part 3 - Move CredentialChosenCallback to a helper class out of the CredentialsContainer - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/7a551acf06fa part 4 - Add IPC for Lightweight FedCM's discovery - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/d146d9d85a63 part 5 - Implement Lightweight FedCM Discovery algorithm - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/e20baed3e71f part 6 - Add tests for LFedCM discovery - r=anti-tracking-reviewers,timhuang

Backed out for causing non-unified build bustages.

[task 2024-06-14T14:31:16.802Z] 14:31:16     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/toolkit/components/credentialmanagement'
[task 2024-06-14T14:31:16.807Z] 14:31:16     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -isysroot /builds/worker/fetches/MacOSX14.4.sdk -mmacosx-version-min=10.15 -stdlib=libc++ --target=x86_64-apple-darwin -o CredentialChosenCallback.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/toolkit/components/credentialmanagement -I/builds/worker/workspace/obj-build/toolkit/components/credentialmanagement -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fPIC -gdwarf-4 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wduplicate-method-arg -Wduplicate-method-match -Wmissing-method-return-type -Wobjc-signed-char-bool -Wsemicolon-before-method-body -Wsuper-class-method-mismatch -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Werror=unguarded-availability-new -Wno-error=builtin-macro-redefined -Wno-vla-cxx-extension -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/CredentialChosenCallback.o.pp   /builds/worker/checkouts/gecko/toolkit/components/credentialmanagement/CredentialChosenCallback.cpp
[task 2024-06-14T14:31:16.808Z] 14:31:16     INFO -  In file included from /builds/worker/checkouts/gecko/toolkit/components/credentialmanagement/CredentialChosenCallback.cpp:7:
[task 2024-06-14T14:31:16.808Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/CredentialChosenCallback.h:10:
[task 2024-06-14T14:31:16.808Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nsICredentialChosenCallback.h:9:
[task 2024-06-14T14:31:16.809Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nsISupports.h:9:
[task 2024-06-14T14:31:16.809Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nsrootidl.h:13:
[task 2024-06-14T14:31:16.810Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nscore.h:12:
[task 2024-06-14T14:31:16.811Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/mozalloc.h:16:
[task 2024-06-14T14:31:16.811Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/stl_wrappers/new:62:
[task 2024-06-14T14:31:16.812Z] 14:31:16     INFO -  In file included from /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/new:399:
[task 2024-06-14T14:31:16.812Z] 14:31:16     INFO -  In file included from /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/exception:83:
[task 2024-06-14T14:31:16.813Z] 14:31:16     INFO -  In file included from /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/__exception/nested_exception.h:16:
[task 2024-06-14T14:31:16.814Z] 14:31:16    ERROR -  /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/is_base_of.h:26:59: error: incomplete type 'mozilla::dom::Credential' used in type trait expression
[task 2024-06-14T14:31:16.814Z] 14:31:16     INFO -     26 | inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
[task 2024-06-14T14:31:16.814Z] 14:31:16     INFO -        |                                                           ^
[task 2024-06-14T14:31:16.815Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/BindingDeclarations.h:126:43: note: in instantiation of variable template specialization 'std::is_base_of_v<mozilla::dom::AllOwningUnionBase, mozilla::dom::Credential>' requested here
[task 2024-06-14T14:31:16.816Z] 14:31:16     INFO -    126 | constexpr bool is_dom_owning_union = std::is_base_of_v<AllOwningUnionBase, T>;
[task 2024-06-14T14:31:16.816Z] 14:31:16     INFO -        |                                           ^
[task 2024-06-14T14:31:16.817Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/ToJSValue.h:342:32: note: in instantiation of variable template specialization 'mozilla::dom::is_dom_owning_union<mozilla::dom::Credential>' requested here
[task 2024-06-14T14:31:16.817Z] 14:31:16     INFO -    342 | [[nodiscard]] std::enable_if_t<is_dom_owning_union<T>, bool> ToJSValue(
[task 2024-06-14T14:31:16.818Z] 14:31:16     INFO -        |                                ^
[task 2024-06-14T14:31:16.819Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/ToJSValue.h:352:10: note: while substituting deduced template arguments into function template 'ToJSValue' [with T = mozilla::dom::Credential]
[task 2024-06-14T14:31:16.819Z] 14:31:16     INFO -    352 |   return ToJSValue(aCx, *aArgument, aValue);
[task 2024-06-14T14:31:16.820Z] 14:31:16     INFO -        |          ^
[task 2024-06-14T14:31:16.821Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Promise.h:423:10: note: in instantiation of function template specialization 'mozilla::dom::ToJSValue<mozilla::dom::Credential *>' requested here
[task 2024-06-14T14:31:16.821Z] 14:31:16     INFO -    423 |     if (!ToJSValue(cx, std::forward<T>(aArgument), &val)) {
[task 2024-06-14T14:31:16.822Z] 14:31:16     INFO -        |          ^
[task 2024-06-14T14:31:16.823Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Promise.h:94:5: note: in instantiation of function template specialization 'mozilla::dom::Promise::MaybeSomething<mozilla::dom::Credential *&>' requested here
[task 2024-06-14T14:31:16.823Z] 14:31:16     INFO -     94 |     MaybeSomething(std::forward<T>(aArg), &Promise::MaybeResolve);
[task 2024-06-14T14:31:16.824Z] 14:31:16     INFO -        |     ^
[task 2024-06-14T14:31:16.825Z] 14:31:16     INFO -  /builds/worker/checkouts/gecko/toolkit/components/credentialmanagement/CredentialChosenCallback.cpp:17:15: note: in instantiation of function template specialization 'mozilla::dom::Promise::MaybeResolve<mozilla::dom::Credential *&>' requested here
[task 2024-06-14T14:31:16.825Z] 14:31:16     INFO -     17 |     mPromise->MaybeResolve(aCredential);
[task 2024-06-14T14:31:16.826Z] 14:31:16     INFO -        |               ^
[task 2024-06-14T14:31:16.826Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/nsICredentialChosenCallback.h:19:7: note: forward declaration of 'mozilla::dom::Credential'
[task 2024-06-14T14:31:16.827Z] 14:31:16     INFO -     19 | class Credential; /* webidl Credential */
[task 2024-06-14T14:31:16.827Z] 14:31:16     INFO -        |       ^
[task 2024-06-14T14:31:16.828Z] 14:31:16     INFO -  In file included from /builds/worker/checkouts/gecko/toolkit/components/credentialmanagement/CredentialChosenCallback.cpp:7:
[task 2024-06-14T14:31:16.828Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/CredentialChosenCallback.h:10:
[task 2024-06-14T14:31:16.829Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nsICredentialChosenCallback.h:9:
[task 2024-06-14T14:31:16.830Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nsISupports.h:9:
[task 2024-06-14T14:31:16.830Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nsrootidl.h:13:
[task 2024-06-14T14:31:16.831Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/nscore.h:12:
[task 2024-06-14T14:31:16.831Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/mozalloc.h:16:
[task 2024-06-14T14:31:16.832Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/stl_wrappers/new:62:
[task 2024-06-14T14:31:16.833Z] 14:31:16     INFO -  In file included from /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/new:399:
[task 2024-06-14T14:31:16.833Z] 14:31:16     INFO -  In file included from /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/exception:83:
[task 2024-06-14T14:31:16.834Z] 14:31:16     INFO -  In file included from /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/__exception/nested_exception.h:16:
[task 2024-06-14T14:31:16.835Z] 14:31:16    ERROR -  /builds/worker/fetches/MacOSX14.4.sdk/usr/include/c++/v1/__type_traits/is_base_of.h:26:59: error: incomplete type 'mozilla::dom::Credential' used in type trait expression
[task 2024-06-14T14:31:16.836Z] 14:31:16     INFO -     26 | inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
[task 2024-06-14T14:31:16.836Z] 14:31:16     INFO -        |                                                           ^
[task 2024-06-14T14:31:16.837Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/BindingDeclarations.h:75:41: note: in instantiation of variable template specialization 'std::is_base_of_v<mozilla::dom::DictionaryBase, mozilla::dom::Credential>' requested here
[task 2024-06-14T14:31:16.838Z] 14:31:16     INFO -     75 | constexpr bool is_dom_dictionary = std::is_base_of_v<DictionaryBase, T>;
[task 2024-06-14T14:31:16.839Z] 14:31:16     INFO -        |                                         ^
[task 2024-06-14T14:31:16.839Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/ToJSValue.h:285:32: note: in instantiation of variable template specialization 'mozilla::dom::is_dom_dictionary<mozilla::dom::Credential>' requested here
[task 2024-06-14T14:31:16.840Z] 14:31:16     INFO -    285 | [[nodiscard]] std::enable_if_t<is_dom_dictionary<T>, bool> ToJSValue(
[task 2024-06-14T14:31:16.841Z] 14:31:16     INFO -        |                                ^
[task 2024-06-14T14:31:16.842Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/ToJSValue.h:352:10: note: while substituting deduced template arguments into function template 'ToJSValue' [with T = mozilla::dom::Credential]
[task 2024-06-14T14:31:16.842Z] 14:31:16     INFO -    352 |   return ToJSValue(aCx, *aArgument, aValue);
[task 2024-06-14T14:31:16.843Z] 14:31:16     INFO -        |          ^
[task 2024-06-14T14:31:16.844Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Promise.h:423:10: note: in instantiation of function template specialization 'mozilla::dom::ToJSValue<mozilla::dom::Credential *>' requested here
[task 2024-06-14T14:31:16.848Z] 14:31:16     INFO -    423 |     if (!ToJSValue(cx, std::forward<T>(aArgument), &val)) {
[task 2024-06-14T14:31:16.849Z] 14:31:16     INFO -        |          ^
[task 2024-06-14T14:31:16.850Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Promise.h:94:5: note: in instantiation of function template specialization 'mozilla::dom::Promise::MaybeSomething<mozilla::dom::Credential *&>' requested here
[task 2024-06-14T14:31:16.851Z] 14:31:16     INFO -     94 |     MaybeSomething(std::forward<T>(aArg), &Promise::MaybeResolve);
[task 2024-06-14T14:31:16.851Z] 14:31:16     INFO -        |     ^
[task 2024-06-14T14:31:16.852Z] 14:31:16     INFO -  /builds/worker/checkouts/gecko/toolkit/components/credentialmanagement/CredentialChosenCallback.cpp:17:15: note: in instantiation of function template specialization 'mozilla::dom::Promise::MaybeResolve<mozilla::dom::Credential *&>' requested here
[task 2024-06-14T14:31:16.853Z] 14:31:16     INFO -     17 |     mPromise->MaybeResolve(aCredential);
[task 2024-06-14T14:31:16.853Z] 14:31:16     INFO -        |               ^
[task 2024-06-14T14:31:16.854Z] 14:31:16     INFO -  /builds/worker/workspace/obj-build/dist/include/nsICredentialChosenCallback.h:19:7: note: forward declaration of 'mozilla::dom::Credential'
[task 2024-06-14T14:31:16.854Z] 14:31:16     INFO -     19 | class Credential; /* webidl Credential */
[task 2024-06-14T14:31:16.855Z] 14:31:16     INFO -        |       ^
[task 2024-06-14T14:31:16.856Z] 14:31:16     INFO -  In file included from /builds/worker/checkouts/gecko/toolkit/components/credentialmanagement/CredentialChosenCallback.cpp:7:
[task 2024-06-14T14:31:16.856Z] 14:31:16     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/CredentialChosenCallback.h:10:
<...>
Flags: needinfo?(bvandersloot)

Fixing with additional includes and re-landing!

Flags: needinfo?(bvandersloot)
Pushed by bvandersloot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/899c3dadc2a6 part 1 - Make a string an enum in (tentative) FedCM webidl - r=anti-tracking-reviewers,webidl,smaug,timhuang https://hg.mozilla.org/integration/autoland/rev/72311a4d3bb5 part 2 - Store a promise on the inner window's global to enable Lightweight FedCM discovery - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/5a324e69ca1c part 3 - Move CredentialChosenCallback to a helper class out of the CredentialsContainer - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/7d1f90aea6e4 part 4 - Add IPC for Lightweight FedCM's discovery - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/ed0b88bbe3e2 part 5 - Implement Lightweight FedCM Discovery algorithm - r=anti-tracking-reviewers,timhuang https://hg.mozilla.org/integration/autoland/rev/33bf78a588a2 part 6 - Add tests for LFedCM discovery - r=anti-tracking-reviewers,timhuang
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: