diff --git a/plugins/libs/plugins-runtime/src/lib/load-plugin.spec.ts b/plugins/libs/plugins-runtime/src/lib/load-plugin.spec.ts index c8d31131a0..a46bbc8573 100644 --- a/plugins/libs/plugins-runtime/src/lib/load-plugin.spec.ts +++ b/plugins/libs/plugins-runtime/src/lib/load-plugin.spec.ts @@ -22,7 +22,6 @@ vi.mock('./create-plugin', () => ({ vi.mock('./ses.js', () => ({ ses: { harden: vi.fn().mockImplementation((obj) => obj), - hardenIntrinsics: vi.fn(), }, })); diff --git a/plugins/libs/plugins-runtime/src/lib/load-plugin.ts b/plugins/libs/plugins-runtime/src/lib/load-plugin.ts index df62cd4fca..990a9148a1 100644 --- a/plugins/libs/plugins-runtime/src/lib/load-plugin.ts +++ b/plugins/libs/plugins-runtime/src/lib/load-plugin.ts @@ -52,16 +52,6 @@ export const loadPlugin = async function ( closeAllPlugins(); - // hardenIntrinsics must be called BEFORE harden() to ensure that - // override taming (enablePropertyOverrides) converts prototype - // properties like Function.prototype.toString into accessor pairs. - // Without this, harden() would freeze Function.prototype with plain - // data properties, making them non-configurable, which causes - // enablePropertyOverrides to silently skip them when hardenIntrinsics - // runs later — resulting in "Cannot assign to read only property - // 'toString'" errors. - ses.hardenIntrinsics(); - const plugin = await createPlugin( ses.harden(context) as Context, manifest,