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

[web] Leave blob URLs untouched in TT policy.#49782

Merged
auto-submit[bot] merged 1 commit into
flutter-team-archive:mainfrom
ditman:web-allow-blob-urls-flutterjs
Jan 16, 2024
Merged

[web] Leave blob URLs untouched in TT policy.#49782
auto-submit[bot] merged 1 commit into
flutter-team-archive:mainfrom
ditman:web-allow-blob-urls-flutterjs

Conversation

@ditman

@ditman ditman commented Jan 13, 2024

Copy link
Copy Markdown
Contributor

Very simple tweak to flutter.js that allows blob URLs to be used as entrypointUrls when loading flutter (this is needed by dartpad)

Testing

I had to test this locally by spinning up a flutter app with something like:

<script>
  let initSrc = `let actualMain = document.createElement("script");
document.head.appendChild(actualMain);
actualMain.id = "injected_from_a_blob";
actualMain.src = "main.dart.js";`;
  let blobInit = new Blob([...initSrc]);
  let blobUrl = URL.createObjectURL(blobInit);
</script>
<script>
  window.addEventListener('load', function(ev) {
    // Download main.dart.js
    _flutter.loader.loadEntrypoint({
      entrypointUrl: blobUrl,
      onEntrypointLoaded: function(engineInitializer) {
        engineInitializer.autoStart();
      }
    });
  });
</script>

Issues

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions Bot added the platform-web Code specifically for the web engine label Jan 13, 2024
@ditman ditman marked this pull request as ready for review January 13, 2024 02:21
@ditman

ditman commented Jan 13, 2024

Copy link
Copy Markdown
Contributor Author

/cc @johnpryan

@yjbanov yjbanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 16, 2024
@auto-submit auto-submit Bot merged commit 021a5ff into flutter-team-archive:main Jan 16, 2024
@ditman ditman deleted the web-allow-blob-urls-flutterjs branch January 16, 2024 22:53
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 16, 2024
auto-submit Bot pushed a commit to flutter/flutter that referenced this pull request Jan 17, 2024
flutter-team-archive/engine@d4b6b7e...021a5ff

2024-01-16 ditman@gmail.com [web] Leave blob URLs untouched in TT policy. (flutter-team-archive/engine#49782)
2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Fix a race between SwapchainImplVK::Present and WaitForFence (flutter-team-archive/engine#49777)
2024-01-16 737941+loic-sharma@users.noreply.github.com Reland "[Windows] Move to FlutterCompositor for rendering" (flutter-team-archive/engine#49726)
2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Add an API for sampling strictly within the bounds of the source rect in DrawImageRect (flutter-team-archive/engine#49696)
2024-01-16 jonahwilliams@google.com [Impeller] Encode directly to command buffer for Vulkan. (flutter-team-archive/engine#49780)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
auto-submit Bot added a commit to flutter/flutter that referenced this pull request Jan 17, 2024
…141659)

Reverts #141651
Initiated by: jonahwilliams
This change reverts the following previous change:
Original Description:

flutter-team-archive/engine@d4b6b7e...021a5ff

2024-01-16 ditman@gmail.com [web] Leave blob URLs untouched in TT policy. (flutter-team-archive/engine#49782)
2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Fix a race between SwapchainImplVK::Present and WaitForFence (flutter-team-archive/engine#49777)
2024-01-16 737941+loic-sharma@users.noreply.github.com Reland "[Windows] Move to FlutterCompositor for rendering" (flutter-team-archive/engine#49726)
2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Add an API for sampling strictly within the bounds of the source rect in DrawImageRect (flutter-team-archive/engine#49696)
2024-01-16 jonahwilliams@google.com [Impeller] Encode directly to command buffer for Vulkan. (flutter-team-archive/engine#49780)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 17, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 17, 2024
auto-submit Bot pushed a commit to flutter/flutter that referenced this pull request Jan 17, 2024
flutter-team-archive/engine@d4b6b7e...1382ff7

2024-01-16 magder@google.com Remove iOS 12 availability checks (flutter-team-archive/engine#49771)
2024-01-16 30870216+gaaclarke@users.noreply.github.com [Impeller] generate mipmaps for imagefilters (flutter-team-archive/engine#49794)
2024-01-16 ditman@gmail.com [web] Leave blob URLs untouched in TT policy. (flutter-team-archive/engine#49782)
2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Fix a race between SwapchainImplVK::Present and WaitForFence (flutter-team-archive/engine#49777)
2024-01-16 737941+loic-sharma@users.noreply.github.com Reland "[Windows] Move to FlutterCompositor for rendering" (flutter-team-archive/engine#49726)
2024-01-16 jason-simmons@users.noreply.github.com [Impeller] Add an API for sampling strictly within the bounds of the source rect in DrawImageRect (flutter-team-archive/engine#49696)
2024-01-16 jonahwilliams@google.com [Impeller] Encode directly to command buffer for Vulkan. (flutter-team-archive/engine#49780)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Development

Successfully merging this pull request may close these issues.

Support Blobs in TrustedTypesPolicy

2 participants