Commit 615612e
committed
permission: reuse cached env strings
Permission::is_scope_granted() and Permission::Drop() built the
"permission" and "resource" diagnostics message keys with
FIXED_ONE_BYTE_STRING(isolate, ...) on every publish, even though
Environment already caches these exact strings via
env->permission_string() and env->resource_string()
(src/env_properties.h). One call site in the same file already used
the cached accessor; these two did not, and Environment is already
in scope at both sites.
Assisted-by: Claude Sonnet 5
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>1 parent b9dacd4 commit 615612e
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
| 330 | + | |
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| |||
0 commit comments