diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2010-02-11 10:55:52 (GMT) |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2010-03-10 09:19:43 (GMT) |
commit | d73e11d56a094544f036fac3f6e4483d1104261e (patch) | |
tree | c292c8f53c660dae3f7681dc7acbbe788730a580 /src/script/bridge/qscriptobject_p.h | |
parent | 20e2b87b5194abf7e9f08b7c42c030a57e2d6b28 (diff) | |
download | Qt-d73e11d56a094544f036fac3f6e4483d1104261e.zip Qt-d73e11d56a094544f036fac3f6e4483d1104261e.tar.gz Qt-d73e11d56a094544f036fac3f6e4483d1104261e.tar.bz2 |
Update src/3rdparty/javascriptcore and adapt src/script to the changes
- Update qscriptvalueiterator test to expect length property when
iterating arrays and strings.
- Use EvalExecutable::create() instead of EvalExecutable constructor.
The constructor is private.
- Reimplement getOwnPropertyDescriptor() in all custom script objects.
- Remove all reimplementations of getPropertyAttributes().
It doesn't exist in trunk anymore (getOwnPropertyDescriptor() is used
instead).
- Remove checkDontDelete argument from deleteProperty() reimplementations.
The purpose of this argument was to support deleting properties
with attribute Undeletable from C++. But it was quite an invasive
patch to JavaScriptCore, and it doesn't seem worth it. If this feature
is really crucial it should be re-done upstream.
One of the tests needed to be updated so it's not sensitive to the
C++ undeletability.
- Adapt getOwnPropertyNames() reimplementations to signature change.
- Add missing QScriptObject structure flags, otherwise we don't get all virtual calls.
- Remove our patch for reporting column numbers in the debugger callbacks.
It was just too intrusive. As with the checkDontDelete issue, this should
be redone upstream if it's really important. In 4.7, QScriptEngineAgent
will always report a column number of 1.
Other compilation fixes:
- InternalFunction::name() takes an ExecState* argument, not GlobalData*
- ScopeChain::globalObject is no longer a function but a member variable
- ScopeChainNode constructor takes a GlobalObject argument
- Heap::collect() is called collectAllGarbage()
- JSValue::strictEqual() takes an ExecState* argument
- Debugger::exception() takes a bool hasHandler argument
- Debugger no longer reports column number (we decided to drop that patch from JSC)
- UString doesn't have operator+=(char*)
- Update the autotests to reflect the columnNumber=1 change.
- Add helper class to avoid crashing inside JSC.
Ever since r52856 in WebKit trunk, this is needed. There are probably a lot of
other public API functions that need this guard as well, but I'll add them as they
are discovered.
- Update mkdist-javascriptcore tag, exclude a few more files.
- Set ENABLE_JSC_MULTIPLE_THREADS=0 define on Mac due to r52355 in trunk.
Reviewed-by: Simon Hausmann
Diffstat (limited to 'src/script/bridge/qscriptobject_p.h')
-rw-r--r-- | src/script/bridge/qscriptobject_p.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/script/bridge/qscriptobject_p.h b/src/script/bridge/qscriptobject_p.h index 4d15bee..f6de418 100644 --- a/src/script/bridge/qscriptobject_p.h +++ b/src/script/bridge/qscriptobject_p.h @@ -67,12 +67,9 @@ public: virtual void put(JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(JSC::ExecState*, - const JSC::Identifier& propertyName, - bool checkDontDelete = true); - virtual bool getPropertyAttributes(JSC::ExecState*, const JSC::Identifier&, - unsigned&) const; + const JSC::Identifier& propertyName); virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, - bool includeNonEnumerable = false); + JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties); virtual void markChildren(JSC::MarkStack& markStack); virtual JSC::CallType getCallData(JSC::CallData&); virtual JSC::ConstructType getConstructData(JSC::ConstructData&); @@ -84,7 +81,7 @@ public: static WTF::PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) { - return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, JSC::ImplementsHasInstance | JSC::OverridesHasInstance)); + return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags)); } inline JSC::JSValue data() const; @@ -94,6 +91,8 @@ public: inline void setDelegate(QScriptObjectDelegate *delegate); protected: + static const unsigned StructureFlags = JSC::ImplementsHasInstance | JSC::OverridesHasInstance | JSC::OverridesGetOwnPropertySlot | JSC::OverridesMarkChildren | JSC::OverridesGetPropertyNames | JSObject::StructureFlags; + Data *d; }; @@ -128,12 +127,9 @@ public: virtual void put(QScriptObject*, JSC::ExecState* exec, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); virtual bool deleteProperty(QScriptObject*, JSC::ExecState*, - const JSC::Identifier& propertyName, - bool checkDontDelete = true); - virtual bool getPropertyAttributes(const QScriptObject*, JSC::ExecState*, - const JSC::Identifier&, unsigned&) const; + const JSC::Identifier& propertyName); virtual void getOwnPropertyNames(QScriptObject*, JSC::ExecState*, JSC::PropertyNameArray&, - bool includeNonEnumerable = false); + JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties); virtual void markChildren(QScriptObject*, JSC::MarkStack& markStack); virtual JSC::CallType getCallData(QScriptObject*, JSC::CallData&); virtual JSC::ConstructType getConstructData(QScriptObject*, JSC::ConstructData&); |