Suggestions#302
Merged
dcalhoun merged 2 commits intofix/mitigate-crash-from-unsafe-assetsfrom Jan 28, 2026
Merged
Conversation
dcalhoun
approved these changes
Jan 28, 2026
Member
dcalhoun
left a comment
There was a problem hiding this comment.
Works well in my testing. Thank you for sharing these suggestions. Very helpful for me. I learned valuable iOS practices.
ios/Sources/GutenbergKit/Sources/Services/EditorAssetBundleProvider.swift
Outdated
Show resolved
Hide resolved
| } | ||
| task.resume() | ||
|
|
||
| self.runningTasks.append(taskHandle) |
Member
There was a problem hiding this comment.
I perceive these are never removed/emptied. Is there a memory leak concern? Should we concern ourselves with cleaning these up at some point or is the risk negligible?
dcalhoun
added a commit
that referenced
this pull request
Jan 29, 2026
* fix: Mitigate crashes from unsafe assets Check for valid asset paths before attempting to access them. * fix: Fetch remote site asset when local cache is unavailable Ensure assets not cached locally still load in the editor. E.g., we do not download and cache images loaded within CSS files. * Suggestions (#302) * Suggestions * docs: Fix inline comment typo --------- Co-authored-by: David Calhoun <github@davidcalhoun.me> --------- Co-authored-by: Jeremy Massel <1123407+jkmassel@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had a bunch of suggestions for #301, so consider this a very large "suggest" review block.
Namely:
EditorHttpClientbecause it'll automatically deal with stuff like "make sure there's an auth header included for private sites".EditorAssetBundleProviderneeds synchronization, so it's all@MainActornow. This means we don't need to do log coalescing (or locking) because it's all on the main thread. This also removes concurrency warnings.I tested this against
jetpack.wpmt.cousing the demo app and it still works ok.