Ignore:
Timestamp:
Mar 1, 2016, 12:11:20 AM (9 years ago)
Author:
[email protected]
Message:

PreventExtensions should be a virtual method in the method table.
https://bugs.webkit.org/show_bug.cgi?id=154800

Reviewed by Yusuke Suzuki.

This patch makes us more consistent with how the ES6 specification models the
PreventExtensions trap. Moving this method into ClassInfo::methodTable
is a prerequisite for implementing Proxy.PreventExtensions.

  • runtime/ClassInfo.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::getGenericPropertyNames):
(JSC::JSCell::preventExtensions):

  • runtime/JSCell.h:
  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::JSModuleNamespaceObject):
(JSC::JSModuleNamespaceObject::finishCreation):
(JSC::JSModuleNamespaceObject::destroy):

  • runtime/JSModuleNamespaceObject.h:

(JSC::JSModuleNamespaceObject::create):
(JSC::JSModuleNamespaceObject::moduleRecord):

  • runtime/JSObject.cpp:

(JSC::JSObject::freeze):
(JSC::JSObject::preventExtensions):
(JSC::JSObject::reifyAllStaticProperties):

  • runtime/JSObject.h:

(JSC::JSObject::isSealed):
(JSC::JSObject::isFrozen):
(JSC::JSObject::isExtensible):

  • runtime/ObjectConstructor.cpp:

(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorPreventExtensions):
(JSC::objectConstructorIsSealed):

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectPreventExtensions):

  • runtime/Structure.cpp:

(JSC::Structure::Structure):
(JSC::Structure::preventExtensionsTransition):

  • runtime/Structure.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r197379 r197391  
    615615    JS_EXPORT_PRIVATE void seal(VM&);
    616616    JS_EXPORT_PRIVATE void freeze(VM&);
    617     JS_EXPORT_PRIVATE void preventExtensions(VM&);
     617    JS_EXPORT_PRIVATE static bool preventExtensions(JSObject*, ExecState*);
    618618    bool isSealed(VM& vm) { return structure(vm)->isSealed(vm); }
    619619    bool isFrozen(VM& vm) { return structure(vm)->isFrozen(vm); }
Note: See TracChangeset for help on using the changeset viewer.