kardagan 2dbbc8aa59 fix(linux): pin WebView response buffer to stop served-asset corruption (#1682)
The app:// URI-scheme handler served embedded static assets through
g_memory_input_stream_new_from_data(), which does not copy the buffer: it
keeps the raw pointer and reads from it asynchronously, calling the destroy
notify only once WebKitGTK is done with the stream. The previous code passed
a pointer into a managed, unpinned MemoryStream buffer together with a no-op
destroy notify, so the GC was free to move, collect or reuse that memory
before/while WebKitGTK read it.

The result was corrupted responses: zeroed bytes (e.g. "SyntaxError: Invalid
character: '\0'" in require.js) and bytes from other concurrent requests
bleeding in (e.g. blazor.webview.js content inside devtoys.g.js). This left
the `devtoys` JS global undefined, which broke icon rendering and every
JS-interop call (addFontToDocument, Popover.connect, setFocus, ...) on Linux.

Pin the response buffer for the whole lifetime of the stream and release the
GCHandle from the destroy notify. Also drops a redundant MemoryStream copy
and uses the actual content length.
2026-09-28 17:45:50 -07:00
2024-04-09 19:15:05 -07:00
2024-07-20 17:46:10 -07:00
2024-04-09 19:15:05 -07:00
2024-04-09 19:15:05 -07:00
2024-04-09 19:15:05 -07:00
2024-03-19 08:10:33 -07:00
2024-07-17 07:32:32 -07:00
2024-04-09 19:15:05 -07:00
2024-04-13 21:13:35 -07:00
2024-03-24 09:17:53 -07:00
2024-06-24 22:06:43 -07:00

DevToys

A Swiss Army knife for developers.

Website

Introduction

DevToys helps with daily development tasks by offering a bundle of tiny tools designed to do quick, specific tiny tasks. No need to use many untrustworthy websites to simply decode a text or compress an image. With Smart Detection, the app intuitively selects the best tool for the data on your clipboard.

DevToys 2.0 comes with 30 default tools:

  • Converters: JSON <> YAML, Date, Number bases...
  • Encoders/Decoders: HTML, URLs, Base64, GZip, JWT, QR Code...
  • Formatters: JSON, SQL, XML...
  • Generators: Hash & Checksum, Lorem Ipsum, Password...
  • Graphics Tools: Color Blindness Simulator, PNG/JPEG Compressor...
  • Testers: JSONPath, RegEx, XML...
  • Text Utilities: Markdown Preview, Text Comparer, Analyzer & Utilities...

More tools are available through extensions, and you can develop your own.

DevToys

Rate on Microsoft Store as of 5/7/2024

Microsoft Store rate

Contribute

See CONTRIBUTING

Privacy Policy

See PRIVACY POLICY

Third-Party Softwares

See ThirdPartyNotices

License

See LICENSE

Special Thanks

Code contributors

Alt

Designers

Zee-Al-Eid Jakub

DevToysMac developer

ObuchiYuki

S
Description
No description provided
Readme MIT
257 MiB
0 Stars 1 Watchers 0 Forks
Languages
C# 69.5%
SCSS 10%
JavaScript 9.6%
HTML 6.2%
TypeScript 4.1%
Other 0.6%