From d0424a769059c84ae20beb3c217812792ea6726b Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 14 Sep 2012 16:29:47 +0200 Subject: Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608) New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make --- Source/JavaScriptCore/API/JSCallbackObject.h | 5 +++-- Source/JavaScriptCore/API/JSCallbackObjectFunctions.h | 10 ++++++++-- Source/JavaScriptCore/API/JSObjectRef.cpp | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) (limited to 'Source/JavaScriptCore/API') diff --git a/Source/JavaScriptCore/API/JSCallbackObject.h b/Source/JavaScriptCore/API/JSCallbackObject.h index 36d7fa9c2..8d7aedd3e 100644 --- a/Source/JavaScriptCore/API/JSCallbackObject.h +++ b/Source/JavaScriptCore/API/JSCallbackObject.h @@ -168,7 +168,7 @@ public: using Parent::methodTable; protected: - static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Parent::StructureFlags; + static const unsigned StructureFlags = ProhibitsPropertyCaching | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Parent::StructureFlags; private: static String className(const JSObject*); @@ -178,6 +178,7 @@ private: static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType); static bool getOwnPropertySlot(JSCell*, ExecState*, PropertyName, PropertySlot&); + static bool getOwnPropertySlotByIndex(JSCell*, ExecState*, unsigned propertyName, PropertySlot&); static bool getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&); static void put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&); @@ -187,7 +188,7 @@ private: static bool hasInstance(JSObject*, ExecState*, JSValue, JSValue proto); - static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode); + static void getOwnNonIndexPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode); static ConstructType getConstructData(JSCell*, ConstructData&); static CallType getCallData(JSCell*, CallData&); diff --git a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h index 0691dafc3..39d078239 100644 --- a/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h +++ b/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h @@ -182,6 +182,12 @@ bool JSCallbackObject::getOwnPropertySlot(JSCell* cell, ExecState* exec, return Parent::getOwnPropertySlot(thisObject, exec, propertyName, slot); } +template +bool JSCallbackObject::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned propertyName, PropertySlot& slot) +{ + return cell->methodTable()->getOwnPropertySlot(cell, exec, Identifier::from(exec, propertyName), slot); +} + template JSValue JSCallbackObject::defaultValue(const JSObject* object, ExecState* exec, PreferredPrimitiveType hint) { @@ -449,7 +455,7 @@ EncodedJSValue JSCallbackObject::call(ExecState* exec) } template -void JSCallbackObject::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) +void JSCallbackObject::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode) { JSCallbackObject* thisObject = jsCast(object); JSContextRef execRef = toRef(exec); @@ -484,7 +490,7 @@ void JSCallbackObject::getOwnPropertyNames(JSObject* object, ExecState* } } - Parent::getOwnPropertyNames(thisObject, exec, propertyNames, mode); + Parent::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode); } template diff --git a/Source/JavaScriptCore/API/JSObjectRef.cpp b/Source/JavaScriptCore/API/JSObjectRef.cpp index e206cb16f..7a8956e4a 100644 --- a/Source/JavaScriptCore/API/JSObjectRef.cpp +++ b/Source/JavaScriptCore/API/JSObjectRef.cpp @@ -29,7 +29,9 @@ #include "JSObjectRefPrivate.h" #include "APICast.h" +#include "ButterflyInlineMethods.h" #include "CodeBlock.h" +#include "CopiedSpaceInlineMethods.h" #include "DateConstructor.h" #include "ErrorConstructor.h" #include "FunctionConstructor.h" -- cgit v1.2.1