Ignore:
Timestamp:
Jun 1, 2011, 11:08:07 AM (14 years ago)
Author:
[email protected]
Message:

2011-05-31 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

Freezing a function and its prototype causes browser to crash.
https://bugs.webkit.org/show_bug.cgi?id=61758

Add test to ensure correct behaviour

  • fast/js/preventExtensions-expected.txt:
  • fast/js/script-tests/preventExtensions.js: (f):

2011-05-31 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

Freezing a function and its prototype causes browser to crash.
https://bugs.webkit.org/show_bug.cgi?id=61758

Make JSObject::preventExtensions virtual so that we can override it
and instantiate all lazy

  • JavaScriptCore.exp:
  • runtime/JSFunction.cpp: (JSC::createPrototypeProperty): (JSC::JSFunction::preventExtensions): (JSC::JSFunction::getOwnPropertySlot):
  • runtime/JSFunction.h:
  • runtime/JSObject.h:
  • runtime/JSObject.cpp: (JSC::JSObject::seal): (JSC::JSObject::seal):
File:
1 edited

Legend:

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

    r84556 r87826  
    9292        bool isHostFunctionNonInline() const;
    9393
     94        virtual void preventExtensions(JSGlobalData&);
    9495        virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
    9596        virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
Note: See TracChangeset for help on using the changeset viewer.