diff options
Diffstat (limited to 'WebCore/bindings/scripts/test')
5 files changed, 62 insertions, 42 deletions
diff --git a/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp index 233ba21..51eb4ec 100644 --- a/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp +++ b/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp @@ -44,13 +44,7 @@ static const HashTableValue JSTestInterfaceTableValues[2] = }; #undef THUNK_GENERATOR -static JSC_CONST_HASHTABLE HashTable JSTestInterfaceTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSTestInterfaceTableValues, 0 }; -#else - { 2, 1, JSTestInterfaceTableValues, 0 }; -#endif - +static JSC_CONST_HASHTABLE HashTable JSTestInterfaceTable = { 2, 1, JSTestInterfaceTableValues, 0 }; /* Hash table for constructor */ #if ENABLE(JIT) #define THUNK_GENERATOR(generator) , generator @@ -64,13 +58,7 @@ static const HashTableValue JSTestInterfaceConstructorTableValues[1] = }; #undef THUNK_GENERATOR -static JSC_CONST_HASHTABLE HashTable JSTestInterfaceConstructorTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSTestInterfaceConstructorTableValues, 0 }; -#else - { 1, 0, JSTestInterfaceConstructorTableValues, 0 }; -#endif - +static JSC_CONST_HASHTABLE HashTable JSTestInterfaceConstructorTable = { 1, 0, JSTestInterfaceConstructorTableValues, 0 }; class JSTestInterfaceConstructor : public DOMConstructorObject { public: JSTestInterfaceConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) @@ -129,13 +117,7 @@ static const HashTableValue JSTestInterfacePrototypeTableValues[1] = }; #undef THUNK_GENERATOR -static JSC_CONST_HASHTABLE HashTable JSTestInterfacePrototypeTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSTestInterfacePrototypeTableValues, 0 }; -#else - { 1, 0, JSTestInterfacePrototypeTableValues, 0 }; -#endif - +static JSC_CONST_HASHTABLE HashTable JSTestInterfacePrototypeTable = { 1, 0, JSTestInterfacePrototypeTableValues, 0 }; const ClassInfo JSTestInterfacePrototype::s_info = { "TestInterfacePrototype", 0, &JSTestInterfacePrototypeTable, 0 }; JSObject* JSTestInterfacePrototype::self(ExecState* exec, JSGlobalObject* globalObject) diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp index de5a171..926d137 100644 --- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp +++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp @@ -66,13 +66,7 @@ static const HashTableValue JSTestObjTableValues[15] = }; #undef THUNK_GENERATOR -static JSC_CONST_HASHTABLE HashTable JSTestObjTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 127, JSTestObjTableValues, 0 }; -#else - { 34, 31, JSTestObjTableValues, 0 }; -#endif - +static JSC_CONST_HASHTABLE HashTable JSTestObjTable = { 34, 31, JSTestObjTableValues, 0 }; /* Hash table for constructor */ #if ENABLE(JIT) #define THUNK_GENERATOR(generator) , generator @@ -86,13 +80,7 @@ static const HashTableValue JSTestObjConstructorTableValues[1] = }; #undef THUNK_GENERATOR -static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 0, JSTestObjConstructorTableValues, 0 }; -#else - { 1, 0, JSTestObjConstructorTableValues, 0 }; -#endif - +static JSC_CONST_HASHTABLE HashTable JSTestObjConstructorTable = { 1, 0, JSTestObjConstructorTableValues, 0 }; class JSTestObjConstructor : public DOMConstructorObject { public: JSTestObjConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) @@ -167,13 +155,7 @@ static const HashTableValue JSTestObjPrototypeTableValues[29] = }; #undef THUNK_GENERATOR -static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = -#if ENABLE(PERFECT_HASH_SIZE) - { 8191, JSTestObjPrototypeTableValues, 0 }; -#else - { 69, 63, JSTestObjPrototypeTableValues, 0 }; -#endif - +static JSC_CONST_HASHTABLE HashTable JSTestObjPrototypeTable = { 69, 63, JSTestObjPrototypeTableValues, 0 }; const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", 0, &JSTestObjPrototypeTable, 0 }; JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject) diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm index 5201a91..e941eda 100644 --- a/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm +++ b/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm @@ -50,6 +50,7 @@ #import "DOMStyleSheetInternal.h" #import "DOMTestCallbackInternal.h" #import "ExceptionHandlers.h" +#import "JSMainThreadExecState.h" #import "KURL.h" #import "TestCallback.h" #import "ThreadCheck.h" @@ -80,21 +81,25 @@ - (BOOL)callbackWithClass1Param:(DOMClass1 *)class1Param { + WebCore::JSMainThreadNullState state; return IMPL->callbackWithClass1Param(core(class1Param)); } - (BOOL)callbackWithClass2Param:(DOMClass2 *)class2Param strArg:(NSString *)strArg { + WebCore::JSMainThreadNullState state; return IMPL->callbackWithClass2Param(core(class2Param), strArg); } - (int)callbackWithNonBoolReturnType:(DOMClass3 *)class3Param { + WebCore::JSMainThreadNullState state; return IMPL->callbackWithNonBoolReturnType(core(class3Param)); } - (int)customCallback:(DOMClass5 *)class5Param class6Param:(DOMClass6 *)class6Param { + WebCore::JSMainThreadNullState state; return IMPL->customCallback(core(class5Param), core(class6Param)); } diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm index a88b366..8fd7791 100644 --- a/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm +++ b/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm @@ -37,6 +37,7 @@ #import "DOMStyleSheetInternal.h" #import "DOMTestInterfaceInternal.h" #import "ExceptionHandlers.h" +#import "JSMainThreadExecState.h" #import "TestInterface.h" #import "ThreadCheck.h" #import "WebCoreObjCExtras.h" diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm index a24f6fe..0f3fb66 100644 --- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm +++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm @@ -39,6 +39,7 @@ #import "DOMlogInternal.h" #import "EventListener.h" #import "ExceptionHandlers.h" +#import "JSMainThreadExecState.h" #import "KURL.h" #import "ObjCEventListener.h" #import "SerializedScriptValue.h" @@ -72,66 +73,79 @@ - (int)readOnlyIntAttr { + WebCore::JSMainThreadNullState state; return IMPL->readOnlyIntAttr(); } - (NSString *)readOnlyStringAttr { + WebCore::JSMainThreadNullState state; return IMPL->readOnlyStringAttr(); } - (DOMTestObj *)readOnlyTestObjAttr { + WebCore::JSMainThreadNullState state; return kit(WTF::getPtr(IMPL->readOnlyTestObjAttr())); } - (int)intAttr { + WebCore::JSMainThreadNullState state; return IMPL->intAttr(); } - (void)setIntAttr:(int)newIntAttr { + WebCore::JSMainThreadNullState state; IMPL->setIntAttr(newIntAttr); } - (long long)longLongAttr { + WebCore::JSMainThreadNullState state; return IMPL->longLongAttr(); } - (void)setLongLongAttr:(long long)newLongLongAttr { + WebCore::JSMainThreadNullState state; IMPL->setLongLongAttr(newLongLongAttr); } - (unsigned long long)unsignedLongLongAttr { + WebCore::JSMainThreadNullState state; return IMPL->unsignedLongLongAttr(); } - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr { + WebCore::JSMainThreadNullState state; IMPL->setUnsignedLongLongAttr(newUnsignedLongLongAttr); } - (NSString *)stringAttr { + WebCore::JSMainThreadNullState state; return IMPL->stringAttr(); } - (void)setStringAttr:(NSString *)newStringAttr { + WebCore::JSMainThreadNullState state; IMPL->setStringAttr(newStringAttr); } - (DOMTestObj *)testObjAttr { + WebCore::JSMainThreadNullState state; return kit(WTF::getPtr(IMPL->testObjAttr())); } - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr { + WebCore::JSMainThreadNullState state; ASSERT(newTestObjAttr); IMPL->setTestObjAttr(core(newTestObjAttr)); @@ -139,16 +153,19 @@ - (int)attrWithException { + WebCore::JSMainThreadNullState state; return IMPL->attrWithException(); } - (void)setAttrWithException:(int)newAttrWithException { + WebCore::JSMainThreadNullState state; IMPL->setAttrWithException(newAttrWithException); } - (int)attrWithSetterException { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; int result = IMPL->attrWithSetterException(ec); WebCore::raiseOnDOMError(ec); @@ -157,6 +174,7 @@ - (void)setAttrWithSetterException:(int)newAttrWithSetterException { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; IMPL->setAttrWithSetterException(newAttrWithSetterException, ec); WebCore::raiseOnDOMError(ec); @@ -164,11 +182,13 @@ - (int)attrWithGetterException { + WebCore::JSMainThreadNullState state; return IMPL->attrWithGetterException(); } - (void)setAttrWithGetterException:(int)newAttrWithGetterException { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; IMPL->setAttrWithGetterException(newAttrWithGetterException, ec); WebCore::raiseOnDOMError(ec); @@ -176,56 +196,67 @@ - (int)customAttr { + WebCore::JSMainThreadNullState state; return IMPL->customAttr(); } - (void)setCustomAttr:(int)newCustomAttr { + WebCore::JSMainThreadNullState state; IMPL->setCustomAttr(newCustomAttr); } - (NSString *)scriptStringAttr { + WebCore::JSMainThreadNullState state; return IMPL->scriptStringAttr(); } - (void)voidMethod { + WebCore::JSMainThreadNullState state; IMPL->voidMethod(); } - (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg { + WebCore::JSMainThreadNullState state; IMPL->voidMethodWithArgs(intArg, strArg, core(objArg)); } - (int)intMethod { + WebCore::JSMainThreadNullState state; return IMPL->intMethod(); } - (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg { + WebCore::JSMainThreadNullState state; return IMPL->intMethodWithArgs(intArg, strArg, core(objArg)); } - (DOMTestObj *)objMethod { + WebCore::JSMainThreadNullState state; return kit(WTF::getPtr(IMPL->objMethod())); } - (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg { + WebCore::JSMainThreadNullState state; return kit(WTF::getPtr(IMPL->objMethodWithArgs(intArg, strArg, core(objArg)))); } - (DOMTestObj *)methodThatRequiresAllArgs:(NSString *)strArg objArg:(DOMTestObj *)objArg { + WebCore::JSMainThreadNullState state; return kit(WTF::getPtr(IMPL->methodThatRequiresAllArgs(strArg, core(objArg)))); } - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; DOMTestObj *result = kit(WTF::getPtr(IMPL->methodThatRequiresAllArgsAndThrows(strArg, core(objArg), ec))); WebCore::raiseOnDOMError(ec); @@ -234,11 +265,13 @@ - (void)serializedValue:(NSString *)serializedArg { + WebCore::JSMainThreadNullState state; IMPL->serializedValue(WebCore::SerializedScriptValue::create(WebCore::String(serializedArg))); } - (void)methodWithException { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; IMPL->methodWithException(ec); WebCore::raiseOnDOMError(ec); @@ -246,16 +279,19 @@ - (void)customMethod { + WebCore::JSMainThreadNullState state; IMPL->customMethod(); } - (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg { + WebCore::JSMainThreadNullState state; IMPL->customMethodWithArgs(intArg, strArg, core(objArg)); } - (void)customArgsAndException:(DOMlog *)intArg { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; IMPL->customArgsAndException(core(intArg), ec); WebCore::raiseOnDOMError(ec); @@ -263,53 +299,63 @@ - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture { + WebCore::JSMainThreadNullState state; RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener); IMPL->addEventListener(type, WTF::getPtr(nativeEventListener), useCapture); } - (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture { + WebCore::JSMainThreadNullState state; RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener); IMPL->removeEventListener(type, WTF::getPtr(nativeEventListener), useCapture); } - (void)withDynamicFrame { + WebCore::JSMainThreadNullState state; IMPL->withDynamicFrame(); } - (void)withDynamicFrameAndArg:(int)intArg { + WebCore::JSMainThreadNullState state; IMPL->withDynamicFrameAndArg(intArg); } - (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg { + WebCore::JSMainThreadNullState state; IMPL->withDynamicFrameAndOptionalArg(intArg, optionalArg); } - (void)withDynamicFrameAndUserGesture:(int)intArg { + WebCore::JSMainThreadNullState state; IMPL->withDynamicFrameAndUserGesture(intArg); } - (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg { + WebCore::JSMainThreadNullState state; IMPL->withDynamicFrameAndUserGestureASAD(intArg, optionalArg); } - (void)withScriptStateVoid { + WebCore::JSMainThreadNullState state; IMPL->withScriptStateVoid(); } - (DOMTestObj *)withScriptStateObj { + WebCore::JSMainThreadNullState state; return kit(WTF::getPtr(IMPL->withScriptStateObj())); } - (void)withScriptStateVoidException { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; IMPL->withScriptStateVoidException(ec); WebCore::raiseOnDOMError(ec); @@ -317,6 +363,7 @@ - (DOMTestObj *)withScriptStateObjException { + WebCore::JSMainThreadNullState state; WebCore::ExceptionCode ec = 0; DOMTestObj *result = kit(WTF::getPtr(IMPL->withScriptStateObjException(ec))); WebCore::raiseOnDOMError(ec); @@ -325,16 +372,19 @@ - (void)methodWithOptionalArg:(int)opt { + WebCore::JSMainThreadNullState state; IMPL->methodWithOptionalArg(opt); } - (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt { + WebCore::JSMainThreadNullState state; IMPL->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); } - (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2 { + WebCore::JSMainThreadNullState state; IMPL->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); } |