test(ses): isImmutableDataProperty regression for iOS Safari fix (#947) - #3314
Open
kriskowal wants to merge 1 commit into
Open
test(ses): isImmutableDataProperty regression for iOS Safari fix (#947)#3314kriskowal wants to merge 1 commit into
kriskowal wants to merge 1 commit into
Conversation
|
gibson042
approved these changes
Jul 1, 2026
iOS Safari 15.0-15.2 reported `showModalDialog` in `Object.getOwnPropertyNames(window)` while `Object.getOwnPropertyDescriptor(window, 'showModalDialog')` returned `undefined`, breaking `lockdown()` with `Cannot read properties of undefined (reading 'configurable')`. The runtime fix added `desc &&` to the head of `isImmutableDataProperty` in `packages/ses/src/scope-constants.js`. This commit pins that fix in place with a regression test that drives `getScopeConstants` through a Proxy global which simulates the iOS Safari anomaly. Refs: #947
kriskowal
force-pushed
the
test/947-isimmutabledataproperty-absent
branch
from
July 16, 2026 23:18
50cf9b1 to
40e3be9
Compare
kriskowal
enabled auto-merge
July 16, 2026 23:18
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.
Description
Adds a regression test pinning the iOS Safari
lockdown()fix inpackages/ses/src/scope-constants.js.iOS Safari 15.0–15.2 reported
showModalDialoginObject.getOwnPropertyNames(window)whileObject.getOwnPropertyDescriptor(window, 'showModalDialog')returnedundefined, breakinglockdown()withTypeError: Cannot read properties of undefined (reading 'configurable')thrown fromisImmutableDataProperty. The runtime fix (adesc &&guard at the head of the function) is already in place; this test pins it.The test drives the public
getScopeConstantsentry point with aProxy-backed global that listsphantomas an own name but returnsundefinedfromgetOwnPropertyDescriptorfor it, mirroring the WebKit anomaly. It assertsgetScopeConstantsdoes not throw and thatphantomis dropped fromglobalObjectConstants. Reverting thedesc &&guard makes the test fail with the original error — verified locally.The test targets the public
getScopeConstantsrather than the unexportedisImmutableDataPropertyhelper, so it stays stable across future refactors.Test-only change; no runtime impact.
Reference: https://bugs.webkit.org/show_bug.cgi?id=234282
Ferried from the bot fork: endojs/endo-but-for-bots#182.
Closes #947