Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: flutter/engine
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bf2e32d
Choose a base ref
...
head repository: flutter/engine
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4956e98
Choose a head ref
  • 4 commits
  • 9 files changed
  • 4 contributors

Commits on May 30, 2024

  1. Configuration menu
    Copy the full SHA
    e4d3bb0 View commit details
    Browse the repository at this point in the history
  2. Replace several NSAssert with FML_CHECK/DCHECK to unblock the build (#…

    …53048)
    
    In flutter/buildroot#860, disabling `NSAssert` in release build was added, and #53005 tries to roll the change into the engine. However, the change is blocked due to several compilation errors in the engine.
    
    This is due to the fact that Google's `DCHECK`(in flutter engine, `FML_DCHECK`) does not make unused variable warning even in release build, while traditional assertion macro like `assert` or `NSAssert` does. For example, the following code will be expanded like this:
    code:
    ```c++
    FML_DCHECK(status == kCVReturnSuccess && pxbuffer != nullptr) <<
       "Failed to create pixel buffer";
    ```
    expanded code:
    ```c++
    true || (status == kCVReturnSuccess && pxbuffer != nullptr)
        ? (void)0 ::
        : fml::LogMessageVoidify() &
              ::fml::LogMessage(::fml::kLogFatal, 0, 0, nullptr).stream()
    ```
    
    However, equivalent code with `NSAssert` will make unused variable warning, since the expanded code doesn't have any reference to the variable:
    code:
    ```c++
    NSAssert(status == kCVReturnSuccess && pxbuffer != NULL, @"Failed to create pixel buffer.");
    ```
    
    expanded code:
    ```c++
    do {
    } while (0)
    ```
    To unblock the build, this CL replaces several `NSAssert` with `FML_DCHECK` in the engine codebase. This CL isn't aimed to replace all `NSAssert` with `FML_DCHECK` since discussions in flutter/buildroot#860 are not finalized whether to replace all `NSAssert` with `FML_DCHECK` or not.
    
    [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
    hpcnt-daniel-l authored May 30, 2024
    Configuration menu
    Copy the full SHA
    3c7a5c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2879ce2 View commit details
    Browse the repository at this point in the history
  4. [semantics] fix dartdoc grammar (#53121)

    Courtesy of @gspencergoog: "which widget" is korrecter than "what widget".
    yjbanov authored May 30, 2024
    Configuration menu
    Copy the full SHA
    4956e98 View commit details
    Browse the repository at this point in the history
Loading