Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1649926 - Always enqueue an async task to change upload and deprecate getUploadEnabled #1046

Merged
merged 12 commits into from
Jul 22, 2020

Commits on Jul 22, 2020

  1. Always enqueue an async task to change upload

    That way it follows what a user expect when calling it inbetween other calls:
    It executes in the right order.
    
    Because the dispatch queue is halted until Glean is fully initialized
    we can safely enqueue here and it will execute after initialization.
    badboy committed Jul 22, 2020
    Configuration menu
    Copy the full SHA
    482a2b7 View commit details
    Browse the repository at this point in the history
  2. Deprecate getUploadEnabled() across all implementations

    Due to Glean's asynchronous initialization the return value can be incorrect.
    Applications should not rely on Glean's internal state.
    Upload enabled status should be tracked by the application and communicated to Glean if it changes.
    Note: The method was removed from the C# implementation.
    badboy committed Jul 22, 2020
    Configuration menu
    Copy the full SHA
    93c17be View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5b3b5de View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    887c3f0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5d9ed97 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c0268a3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8f0ea21 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    758b284 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    d165822 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    47e7865 View commit details
    Browse the repository at this point in the history
  11. Reset all global state when destroying the Glean handle

    After we destroy the Glean handle we should be conceptually in a clean
    state, just as if the app is just starting and loading Glean.
    
    And for Glean that means tasks should get queued up.
    Some tests explicitly toggle this already, but resetting it here does
    not seem to affect them.
    badboy committed Jul 22, 2020
    Configuration menu
    Copy the full SHA
    2971286 View commit details
    Browse the repository at this point in the history
  12. Log as errors

    Co-authored-by: Alessio Placitelli <alessio.placitelli@gmail.com>
    badboy and Dexterp37 committed Jul 22, 2020
    Configuration menu
    Copy the full SHA
    2717a62 View commit details
    Browse the repository at this point in the history