Remove obsolete `#pragma allow_unsafe_buffers` compiler directive

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

← 返回列表

Remove obsolete `#pragma allow_unsafe_buffers` compiler directive

Minor
提交哈希: cab606d12ed8680978e482a0cdec691c7f06f6d2
提交时间: 2025-07-16 20:53:37+00:00
影响等级: Minor
生成工具: webview2-upstream-sentry
上游审核链接: 查看上游审核 🔗

📋 摘要

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.

🎯 影响分析

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.

受影响的类:

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