Code Monkey home page Code Monkey logo

Comments (13)

erights avatar erights commented on July 18, 2024

At https://github.com/Agoric/SES/blob/master/src/index.js there is a commented out call to tamperProofDataProperties but the only thing I could find is https://github.com/tc39/proposal-frozen-realms/blob/master/shim/src/mutable.js which is to a much earlier version. Where is the code containing the tamperProofDataProperties we used to call?

from endo.

erights avatar erights commented on July 18, 2024

@bmeck @littledan , where is a good place to track this issue? Could you reply with a link? Thanks.

from endo.

erights avatar erights commented on July 18, 2024

Sorry. By "this issue" I mean the attempt to fix the override mistake in the EcmaScript spec, which is only distantly related to this issue. Nevertheless, it would be nice to have a link here. Thanks.

from endo.

bmeck avatar bmeck commented on July 18, 2024

tc39/ecma262#1320 is probably the best place currently as it deals w/ the spec changes 1307 can probably closed in lieu of it.

from endo.

erights avatar erights commented on July 18, 2024

Hi @jfparadis , did you say that your data suggested we only need this repair on
Object.prototype, Function.prototype, RegExpr.prototype? What about Array.prototype`? Others?

For the prototypes we do repair, which properties should we repair?

from endo.

jfparadis avatar jfparadis commented on July 18, 2024

Here is the current list:
Object.prototype
Array.prototype
Function.prototype
Error.prototype

from endo.

erights avatar erights commented on July 18, 2024

Thanks.

Do you have any data on which properties on these prototypes could remain unrepaired?

from endo.

jfparadis avatar jfparadis commented on July 18, 2024

All prototype properties of Object and Array need to me repaired because arrays are often used as objects, and any property can be set on objects to allow compatibility.

For the rest, we can only repair Function 'name' and Error 'message'.

from endo.

kumavis avatar kumavis commented on July 18, 2024

found tamperProofDataProperties

After finding the history, I think mutable.js is actually the newer version.

from endo.

erights avatar erights commented on July 18, 2024

After finding the history, I think mutable.js is actually the newer version.

Newer than tamper-proof.js, yes. But not the newest. Waiting from responses from @caridy @jdalton @jfparadis @guybedford @bmeck

from endo.

bmeck avatar bmeck commented on July 18, 2024

node is currently using https://github.com/nodejs/node/blob/554ffa34320ebfe62e6eefd4607483866362efd3/lib/internal/freeze_intrinsics.js#L253 but can align with w/e is preferred.

from endo.

erights avatar erights commented on July 18, 2024

I like the name enableDerivedOverride. Anyone see what the other differences are?

from endo.

manuel-jasso avatar manuel-jasso commented on July 18, 2024

After finding the history, I think mutable.js is actually the newer version.

Newer than tamper-proof.js, yes. But not the newest. Waiting from responses from @caridy @jdalton @jfparadis @guybedford @bmeck

@erights Commenting as requested by @caridy - Salesforce's Locker uses a customized version of mutable.js, with some prototypes commented out:

    [
      i.ObjectPrototype,
      i.ArrayPrototype
      // i.BooleanPrototype,
      // i.DatePrototype,
      // i.NumberPrototype,
      // i.StringPrototype,

      // i.IteratorPrototype,
      // i.ArrayIteratorPrototype,

      // i.PromisePrototype,
      // i.DataViewPrototype,

      // i.TypedArray,
      // i.Int8ArrayPrototype,
      // i.Int16ArrayPrototype,
      // i.Int32ArrayPrototype,
      // i.Uint8Array,
      // i.Uint16Array,
      // i.Uint32Array
    ],

For these prototypes we apply beMutable to the name property only:

    [
      i.FunctionPrototype,
      i.GeneratorPrototype,
      i.AsyncFunctionPrototype,
      i.AsyncGeneratorPrototype
    ],

And for these prototypes we apply beMutable to the message property only:

    [
      i.ErrorPrototype,
      i.EvalErrorPrototype,
      i.RangeErrorPrototype,
      i.ReferenceErrorPrototype,
      i.SyntaxErrorPrototype,
      i.TypeErrorPrototype,
      i.URIErrorPrototype
    ],

from endo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.