Remove obsolete `#pragma allow_unsafe_buffers` compiler directive

Commit: cab606d1 | 2025-07-16 20:53:37+00:00

← Back to List

Remove obsolete `#pragma allow_unsafe_buffers` compiler directive

Minor
Commit Hash: cab606d12ed8680978e482a0cdec691c7f06f6d2
Commit Time: 2025-07-16 20:53:37+00:00
Impact Level: Minor
Generated By: webview2-upstream-sentry
Upstream Review: View Upstream Review 🔗

📋 Summary

This submission primarily automates the cleanup of obsolete #pragma allow_unsafe_buffers compiler directives from various source files. The directive was originally used to permit unsafe buffer operations. As the codebase undergoes "spanification" (i.e., replacing raw pointers and arrays with safer spans/containers), some files can now be compiled without this directive, so it is being removed. This change does not involve any modifications to business logic or behavior; it is a harmless cleanup related solely to compilation.

🎯 Impact Analysis

There is virtually no practical impact on WebView2Mac. The only file related to remote_cocoa involved is content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm, which only removes the #pragma allow_unsafe_buffers under conditional compilation, without changing any classes, interfaces, or actual implementation logic. The functionality, performance, and interface compatibility of WebView2Mac will not be affected. If downstream code depends on this file and previously relied on this pragma, it may theoretically reduce compilation warnings or errors, but the actual impact is minimal.

Impacted Classes:

无(remote_cocoa 相关类和接口未受影响)