Skip to content

Commit

Permalink
fix(ses): better safari debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Jun 24, 2023
1 parent 1e9026d commit 8cca7db
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/ses/src/strict-scope-terminator.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ const scopeProxyHandlerProperties = {

// note: this is likely a bug of safari
// https://bugs.webkit.org/show_bug.cgi?id=195534
getPrototypeOf() {
getPrototypeOf(_shadow) {
return null;
},

// See https://github.com/endojs/endo/issues/1510
// TODO: report as bug to v8 or Chrome, and record issue link here.
getOwnPropertyDescriptor(_target, prop) {
getOwnPropertyDescriptor(_shadow, prop) {
// Coerce with `String` in case prop is a symbol.
const quotedProp = q(String(prop));
// eslint-disable-next-line @endo/no-polymorphic-call
Expand All @@ -69,6 +69,12 @@ const scopeProxyHandlerProperties = {
);
return undefined;
},

// See https://github.com/endojs/endo/issues/1490
// TODO Report bug to JSC or Safari
ownKeys(_shadow) {
return [];
},
};

// The scope handler's prototype is a proxy that throws if any trap other
Expand Down

0 comments on commit 8cca7db

Please sign in to comment.