summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/scripts')
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorJS.pm22
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorObjC.pm6
-rw-r--r--WebCore/bindings/scripts/CodeGeneratorV8.pm13
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestInterface.cpp24
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.cpp24
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm5
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm1
-rw-r--r--WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm50
8 files changed, 92 insertions, 53 deletions
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 46ac42d..3be997f 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -226,7 +226,7 @@ sub IndexGetterReturnsStrings
{
my $type = shift;
- return 1 if $type eq "CSSStyleDeclaration" or $type eq "MediaList" or $type eq "CSSVariablesDeclaration";
+ return 1 if $type eq "CSSStyleDeclaration" or $type eq "MediaList" or $type eq "CSSVariablesDeclaration" or $type eq "DOMStringList";
return 0;
}
@@ -643,6 +643,8 @@ sub GenerateHeader
if ($hasParent && $dataNode->extendedAttributes->{"GenerateNativeConverter"}) {
$headerIncludes{"$implClassName.h"} = 1;
}
+
+ $headerIncludes{"<runtime/JSObjectWithGlobalObject.h>"} = 1;
$headerIncludes{"SVGElement.h"} = 1 if $className =~ /^JSSVG/;
@@ -935,8 +937,8 @@ sub GenerateHeader
# Add prototype declaration.
%structureFlags = ();
- push(@headerContent, "class ${className}Prototype : public JSC::JSObject {\n");
- push(@headerContent, " typedef JSC::JSObject Base;\n");
+ push(@headerContent, "class ${className}Prototype : public JSC::JSObjectWithGlobalObject {\n");
+ push(@headerContent, " typedef JSC::JSObjectWithGlobalObject Base;\n");
push(@headerContent, "public:\n");
if ($interfaceName eq "DOMWindow") {
push(@headerContent, " void* operator new(size_t);\n");
@@ -970,7 +972,7 @@ sub GenerateHeader
# Custom defineGetter function
push(@headerContent, " virtual void defineGetter(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSObject* getterFunction, unsigned attributes);\n") if $dataNode->extendedAttributes->{"CustomPrototypeDefineGetter"};
- push(@headerContent, " ${className}Prototype(NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObject(structure) { }\n");
+ push(@headerContent, " ${className}Prototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { }\n");
# structure flags
push(@headerContent, "protected:\n");
@@ -985,7 +987,7 @@ sub GenerateHeader
if ($numFunctions > 0) {
push(@headerContent,"// Functions\n\n");
foreach my $function (@{$dataNode->functions}) {
- next if $function->{overloadIndex} > 1;
+ next if $function->{overloadIndex} && $function->{overloadIndex} > 1;
my $functionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name);
push(@headerContent, "JSC::JSValue JSC_HOST_CALL ${functionName}(JSC::ExecState*, JSC::JSObject*, JSC::JSValue, const JSC::ArgList&);\n");
}
@@ -1254,7 +1256,7 @@ sub GenerateImplementation
}
foreach my $function (@{$dataNode->functions}) {
- next if $function->{overloadIndex} > 1;
+ next if $function->{overloadIndex} && $function->{overloadIndex} > 1;
my $name = $function->signature->name;
push(@hashKeys, $name);
@@ -1440,9 +1442,9 @@ sub GenerateImplementation
push(@implContent, "JSObject* ${className}::createPrototype(ExecState* exec, JSGlobalObject* globalObject)\n");
push(@implContent, "{\n");
if ($hasParent && $parentClassName ne "JSC::DOMNodeFilter") {
- push(@implContent, " return new (exec) ${className}Prototype(${className}Prototype::createStructure(${parentClassName}Prototype::self(exec, globalObject)));\n");
+ push(@implContent, " return new (exec) ${className}Prototype(globalObject, ${className}Prototype::createStructure(${parentClassName}Prototype::self(exec, globalObject)));\n");
} else {
- push(@implContent, " return new (exec) ${className}Prototype(${className}Prototype::createStructure(globalObject->objectPrototype()));\n");
+ push(@implContent, " return new (exec) ${className}Prototype(globalObject, ${className}Prototype::createStructure(globalObject->objectPrototype()));\n");
}
push(@implContent, "}\n\n");
}
@@ -1781,7 +1783,7 @@ sub GenerateImplementation
my $functionName = $codeGenerator->WK_lcfirst($className) . "PrototypeFunction" . $codeGenerator->WK_ucfirst($function->signature->name);
- if (@{$function->{overloads}} > 1) {
+ if ($function->{overloads} && @{$function->{overloads}} > 1) {
# Append a number to an overloaded method's name to make it unique:
$functionName = $functionName . $function->{overloadIndex};
}
@@ -1953,7 +1955,7 @@ sub GenerateImplementation
}
push(@implContent, "}\n\n");
- if (@{$function->{overloads}} > 1 && $function->{overloadIndex} == @{$function->{overloads}}) {
+ if ($function->{overloads} && @{$function->{overloads}} > 1 && $function->{overloadIndex} == @{$function->{overloads}}) {
# Generate a function dispatching call to the rest of the overloads.
GenerateOverloadedPrototypeFunction($function, $dataNode, $implClassName);
}
diff --git a/WebCore/bindings/scripts/CodeGeneratorObjC.pm b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
index 7132e22..e06b274 100644
--- a/WebCore/bindings/scripts/CodeGeneratorObjC.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorObjC.pm
@@ -80,6 +80,7 @@ my %baseTypeHash = ("Object" => 1, "Node" => 1, "NodeList" => 1, "NamedNodeMap"
my $buildingForTigerOrEarlier = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} <= 10.4;
my $buildingForLeopardOrLater = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5;
my $exceptionInit = "WebCore::ExceptionCode ec = 0;";
+my $jsContextSetter = "WebCore::JSMainThreadNullState state;";
my $exceptionRaiseOnError = "WebCore::raiseOnDOMError(ec);";
my $assertMainThread = "{ DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); }";
@@ -1056,6 +1057,7 @@ sub GenerateImplementation
$implIncludes{"ExceptionHandlers.h"} = 1;
$implIncludes{"ThreadCheck.h"} = 1;
+ $implIncludes{"JSMainThreadExecState.h"} = 1;
$implIncludes{"WebScriptObjectPrivate.h"} = 1;
$implIncludes{$classHeaderName . "Internal.h"} = 1;
@@ -1268,6 +1270,7 @@ sub GenerateImplementation
push(@implContent, $getterSig);
push(@implContent, "{\n");
+ push(@implContent, " $jsContextSetter\n");
push(@implContent, @customGetterContent);
if ($hasGetterException) {
# Differentiated between when the return type is a pointer and
@@ -1308,6 +1311,7 @@ sub GenerateImplementation
push(@implContent, $setterSig);
push(@implContent, "{\n");
+ push(@implContent, " $jsContextSetter\n");
unless ($codeGenerator->IsPrimitiveType($idlType) or $codeGenerator->IsStringType($idlType)) {
push(@implContent, " ASSERT($argName);\n\n");
@@ -1523,6 +1527,7 @@ sub GenerateImplementation
push(@implContent, "$functionSig\n");
push(@implContent, "{\n");
+ push(@implContent, " $jsContextSetter\n");
push(@implContent, @functionContent);
push(@implContent, "}\n\n");
@@ -1533,6 +1538,7 @@ sub GenerateImplementation
push(@implContent, "$deprecatedFunctionSig\n");
push(@implContent, "{\n");
+ push(@implContent, " $jsContextSetter\n");
push(@implContent, @functionContent);
push(@implContent, "}\n\n");
}
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index f38e0d1..0167a4f 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -628,7 +628,10 @@ sub GenerateNormalAttrGetter
my $getterStringUsesImp = $implClassName ne "float";
- # Getter
+ # Getter
+ my $conditionalString = GenerateConditionalString($attribute->signature);
+ push(@implContentDecls, "#if ${conditionalString}\n\n") if $conditionalString;
+
push(@implContentDecls, <<END);
static v8::Handle<v8::Value> ${attrName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
@@ -671,6 +674,7 @@ END
$implIncludes{"${namespace}.h"} = 1;
push(@implContentDecls, " return getElementStringAttr(info, ${namespace}::${contentAttributeName}Attr);\n");
push(@implContentDecls, "}\n\n");
+ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
return;
# Skip the rest of the function!
}
@@ -801,6 +805,7 @@ END
push(@implContentDecls, " }\n");
push(@implContentDecls, " return wrapper;\n");
push(@implContentDecls, "}\n\n");
+ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
return;
}
}
@@ -825,6 +830,7 @@ END
}
push(@implContentDecls, "}\n\n"); # end of getter
+ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
}
sub GenerateNormalAttrSetter
@@ -836,6 +842,9 @@ sub GenerateNormalAttrSetter
my $attrExt = $attribute->signature->extendedAttributes;
+ my $conditionalString = GenerateConditionalString($attribute->signature);
+ push(@implContentDecls, "#if ${conditionalString}\n\n") if $conditionalString;
+
push(@implContentDecls, "static void ${attrName}AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n{\n");
push(@implContentDecls, " INC_STATS(\"DOM.$implClassName.$attrName._set\");\n");
@@ -875,6 +884,7 @@ END
$implIncludes{"${namespace}.h"} = 1;
push(@implContentDecls, " setElementStringAttr(info, ${namespace}::${contentAttributeName}Attr, value);\n");
push(@implContentDecls, "}\n\n");
+ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
return;
# Skip the rest of the function!
}
@@ -963,6 +973,7 @@ END
push(@implContentDecls, " return;\n");
push(@implContentDecls, "}\n\n"); # end of setter
+ push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
}
sub GetFunctionTemplateCallbackName
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);
}