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/JSModuleNamespaceObject.h

    r189429 r197391  
    4242    {
    4343        JSModuleNamespaceObject* object = new (NotNull, allocateCell<JSModuleNamespaceObject>(exec->vm().heap)) JSModuleNamespaceObject(exec->vm(), structure);
    44         object->finishCreation(exec->vm(), globalObject, moduleRecord, exports);
     44        object->finishCreation(exec, globalObject, moduleRecord, exports);
    4545        return object;
    4646    }
     
    6363
    6464protected:
    65     JS_EXPORT_PRIVATE void finishCreation(VM&, JSGlobalObject*, JSModuleRecord*, const IdentifierSet& exports);
     65    JS_EXPORT_PRIVATE void finishCreation(ExecState*, JSGlobalObject*, JSModuleRecord*, const IdentifierSet& exports);
    6666    JS_EXPORT_PRIVATE JSModuleNamespaceObject(VM&, Structure*);
    6767
Note: See TracChangeset for help on using the changeset viewer.