Home | History | Annotate | Download | only in ObjC
      1 /*
      2  * This file is part of the WebKit open source project.
      3  * This file has been generated by generate-bindings.pl. DO NOT MODIFY!
      4  *
      5  * Redistribution and use in source and binary forms, with or without
      6  * modification, are permitted provided that the following conditions
      7  * are met:
      8  * 1. Redistributions of source code must retain the above copyright
      9  *    notice, this list of conditions and the following disclaimer.
     10  * 2. Redistributions in binary form must reproduce the above copyright
     11  *    notice, this list of conditions and the following disclaimer in the
     12  *    documentation and/or other materials provided with the distribution.
     13  *
     14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
     21  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
     22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25  */
     26 
     27 #import "config.h"
     28 #import "DOMInternal.h"
     29 
     30 #import "DOMTestObj.h"
     31 
     32 #import "DOMBlobInternal.h"
     33 #import "DOMCSSRuleInternal.h"
     34 #import "DOMCSSValueInternal.h"
     35 #import "DOMEventInternal.h"
     36 #import "DOMIDBKeyInternal.h"
     37 #import "DOMNodeInternal.h"
     38 #import "DOMOptionsObjectInternal.h"
     39 #import "DOMStyleSheetInternal.h"
     40 #import "DOMTestObjInternal.h"
     41 #import "DOMlogInternal.h"
     42 #import "EventListener.h"
     43 #import "ExceptionHandlers.h"
     44 #import "HTMLNames.h"
     45 #import "IDBKey.h"
     46 #import "JSMainThreadExecState.h"
     47 #import "KURL.h"
     48 #import "ObjCEventListener.h"
     49 #import "OptionsObject.h"
     50 #import "SerializedScriptValue.h"
     51 #import "TestObj.h"
     52 #import "ThreadCheck.h"
     53 #import "WebCoreObjCExtras.h"
     54 #import "WebScriptObjectPrivate.h"
     55 #import "log.h"
     56 #import <wtf/GetPtr.h>
     57 
     58 #define IMPL reinterpret_cast<WebCore::TestObj*>(_internal)
     59 
     60 @implementation DOMTestObj
     61 
     62 - (void)dealloc
     63 {
     64     if (WebCoreObjCScheduleDeallocateOnMainThread([DOMTestObj class], self))
     65         return;
     66 
     67     if (_internal)
     68         IMPL->deref();
     69     [super dealloc];
     70 }
     71 
     72 - (void)finalize
     73 {
     74     if (_internal)
     75         IMPL->deref();
     76     [super finalize];
     77 }
     78 
     79 - (int)readOnlyIntAttr
     80 {
     81     WebCore::JSMainThreadNullState state;
     82     return IMPL->readOnlyIntAttr();
     83 }
     84 
     85 - (NSString *)readOnlyStringAttr
     86 {
     87     WebCore::JSMainThreadNullState state;
     88     return IMPL->readOnlyStringAttr();
     89 }
     90 
     91 - (DOMTestObj *)readOnlyTestObjAttr
     92 {
     93     WebCore::JSMainThreadNullState state;
     94     return kit(WTF::getPtr(IMPL->readOnlyTestObjAttr()));
     95 }
     96 
     97 - (short)shortAttr
     98 {
     99     WebCore::JSMainThreadNullState state;
    100     return IMPL->shortAttr();
    101 }
    102 
    103 - (void)setShortAttr:(short)newShortAttr
    104 {
    105     WebCore::JSMainThreadNullState state;
    106     IMPL->setShortAttr(newShortAttr);
    107 }
    108 
    109 - (unsigned short)unsignedShortAttr
    110 {
    111     WebCore::JSMainThreadNullState state;
    112     return IMPL->unsignedShortAttr();
    113 }
    114 
    115 - (void)setUnsignedShortAttr:(unsigned short)newUnsignedShortAttr
    116 {
    117     WebCore::JSMainThreadNullState state;
    118     IMPL->setUnsignedShortAttr(newUnsignedShortAttr);
    119 }
    120 
    121 - (int)intAttr
    122 {
    123     WebCore::JSMainThreadNullState state;
    124     return IMPL->intAttr();
    125 }
    126 
    127 - (void)setIntAttr:(int)newIntAttr
    128 {
    129     WebCore::JSMainThreadNullState state;
    130     IMPL->setIntAttr(newIntAttr);
    131 }
    132 
    133 - (long long)longLongAttr
    134 {
    135     WebCore::JSMainThreadNullState state;
    136     return IMPL->longLongAttr();
    137 }
    138 
    139 - (void)setLongLongAttr:(long long)newLongLongAttr
    140 {
    141     WebCore::JSMainThreadNullState state;
    142     IMPL->setLongLongAttr(newLongLongAttr);
    143 }
    144 
    145 - (unsigned long long)unsignedLongLongAttr
    146 {
    147     WebCore::JSMainThreadNullState state;
    148     return IMPL->unsignedLongLongAttr();
    149 }
    150 
    151 - (void)setUnsignedLongLongAttr:(unsigned long long)newUnsignedLongLongAttr
    152 {
    153     WebCore::JSMainThreadNullState state;
    154     IMPL->setUnsignedLongLongAttr(newUnsignedLongLongAttr);
    155 }
    156 
    157 - (NSString *)stringAttr
    158 {
    159     WebCore::JSMainThreadNullState state;
    160     return IMPL->stringAttr();
    161 }
    162 
    163 - (void)setStringAttr:(NSString *)newStringAttr
    164 {
    165     WebCore::JSMainThreadNullState state;
    166     IMPL->setStringAttr(newStringAttr);
    167 }
    168 
    169 - (DOMTestObj *)testObjAttr
    170 {
    171     WebCore::JSMainThreadNullState state;
    172     return kit(WTF::getPtr(IMPL->testObjAttr()));
    173 }
    174 
    175 - (void)setTestObjAttr:(DOMTestObj *)newTestObjAttr
    176 {
    177     WebCore::JSMainThreadNullState state;
    178     ASSERT(newTestObjAttr);
    179 
    180     IMPL->setTestObjAttr(core(newTestObjAttr));
    181 }
    182 
    183 - (DOMTestObj *)XMLObjAttr
    184 {
    185     WebCore::JSMainThreadNullState state;
    186     return kit(WTF::getPtr(IMPL->xmlObjAttr()));
    187 }
    188 
    189 - (void)setXMLObjAttr:(DOMTestObj *)newXMLObjAttr
    190 {
    191     WebCore::JSMainThreadNullState state;
    192     ASSERT(newXMLObjAttr);
    193 
    194     IMPL->setXMLObjAttr(core(newXMLObjAttr));
    195 }
    196 
    197 - (BOOL)create
    198 {
    199     WebCore::JSMainThreadNullState state;
    200     return IMPL->isCreate();
    201 }
    202 
    203 - (void)setCreate:(BOOL)newCreate
    204 {
    205     WebCore::JSMainThreadNullState state;
    206     IMPL->setCreate(newCreate);
    207 }
    208 
    209 - (NSString *)reflectedStringAttr
    210 {
    211     WebCore::JSMainThreadNullState state;
    212     return IMPL->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr);
    213 }
    214 
    215 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr
    216 {
    217     WebCore::JSMainThreadNullState state;
    218     IMPL->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, newReflectedStringAttr);
    219 }
    220 
    221 - (int)reflectedIntegralAttr
    222 {
    223     WebCore::JSMainThreadNullState state;
    224     return IMPL->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr);
    225 }
    226 
    227 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr
    228 {
    229     WebCore::JSMainThreadNullState state;
    230     IMPL->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
    231 }
    232 
    233 - (unsigned)reflectedUnsignedIntegralAttr
    234 {
    235     WebCore::JSMainThreadNullState state;
    236     return IMPL->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
    237 }
    238 
    239 - (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr
    240 {
    241     WebCore::JSMainThreadNullState state;
    242     IMPL->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr);
    243 }
    244 
    245 - (BOOL)reflectedBooleanAttr
    246 {
    247     WebCore::JSMainThreadNullState state;
    248     return IMPL->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr);
    249 }
    250 
    251 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr
    252 {
    253     WebCore::JSMainThreadNullState state;
    254     IMPL->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, newReflectedBooleanAttr);
    255 }
    256 
    257 - (NSString *)reflectedURLAttr
    258 {
    259     WebCore::JSMainThreadNullState state;
    260     return IMPL->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr);
    261 }
    262 
    263 - (void)setReflectedURLAttr:(NSString *)newReflectedURLAttr
    264 {
    265     WebCore::JSMainThreadNullState state;
    266     IMPL->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, newReflectedURLAttr);
    267 }
    268 
    269 - (NSString *)reflectedNonEmptyURLAttr
    270 {
    271     WebCore::JSMainThreadNullState state;
    272     return IMPL->getNonEmptyURLAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr);
    273 }
    274 
    275 - (void)setReflectedNonEmptyURLAttr:(NSString *)newReflectedNonEmptyURLAttr
    276 {
    277     WebCore::JSMainThreadNullState state;
    278     IMPL->setAttribute(WebCore::HTMLNames::reflectednonemptyurlattrAttr, newReflectedNonEmptyURLAttr);
    279 }
    280 
    281 - (NSString *)reflectedStringAttr
    282 {
    283     WebCore::JSMainThreadNullState state;
    284     return IMPL->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr);
    285 }
    286 
    287 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr
    288 {
    289     WebCore::JSMainThreadNullState state;
    290     IMPL->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, newReflectedStringAttr);
    291 }
    292 
    293 - (int)reflectedCustomIntegralAttr
    294 {
    295     WebCore::JSMainThreadNullState state;
    296     return IMPL->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr);
    297 }
    298 
    299 - (void)setReflectedCustomIntegralAttr:(int)newReflectedCustomIntegralAttr
    300 {
    301     WebCore::JSMainThreadNullState state;
    302     IMPL->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, newReflectedCustomIntegralAttr);
    303 }
    304 
    305 - (BOOL)reflectedCustomBooleanAttr
    306 {
    307     WebCore::JSMainThreadNullState state;
    308     return IMPL->hasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr);
    309 }
    310 
    311 - (void)setReflectedCustomBooleanAttr:(BOOL)newReflectedCustomBooleanAttr
    312 {
    313     WebCore::JSMainThreadNullState state;
    314     IMPL->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, newReflectedCustomBooleanAttr);
    315 }
    316 
    317 - (NSString *)reflectedCustomURLAttr
    318 {
    319     WebCore::JSMainThreadNullState state;
    320     return IMPL->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr);
    321 }
    322 
    323 - (void)setReflectedCustomURLAttr:(NSString *)newReflectedCustomURLAttr
    324 {
    325     WebCore::JSMainThreadNullState state;
    326     IMPL->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, newReflectedCustomURLAttr);
    327 }
    328 
    329 - (NSString *)reflectedCustomNonEmptyURLAttr
    330 {
    331     WebCore::JSMainThreadNullState state;
    332     return IMPL->getNonEmptyURLAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr);
    333 }
    334 
    335 - (void)setReflectedCustomNonEmptyURLAttr:(NSString *)newReflectedCustomNonEmptyURLAttr
    336 {
    337     WebCore::JSMainThreadNullState state;
    338     IMPL->setAttribute(WebCore::HTMLNames::customContentNonEmptyURLAttrAttr, newReflectedCustomNonEmptyURLAttr);
    339 }
    340 
    341 - (int)attrWithGetterException
    342 {
    343     WebCore::JSMainThreadNullState state;
    344     WebCore::ExceptionCode ec = 0;
    345     int result = IMPL->attrWithGetterException(ec);
    346     WebCore::raiseOnDOMError(ec);
    347     return result;
    348 }
    349 
    350 - (void)setAttrWithGetterException:(int)newAttrWithGetterException
    351 {
    352     WebCore::JSMainThreadNullState state;
    353     WebCore::ExceptionCode ec = 0;
    354     IMPL->setAttrWithGetterException(newAttrWithGetterException, ec);
    355     WebCore::raiseOnDOMError(ec);
    356 }
    357 
    358 - (int)attrWithSetterException
    359 {
    360     WebCore::JSMainThreadNullState state;
    361     return IMPL->attrWithSetterException();
    362 }
    363 
    364 - (void)setAttrWithSetterException:(int)newAttrWithSetterException
    365 {
    366     WebCore::JSMainThreadNullState state;
    367     WebCore::ExceptionCode ec = 0;
    368     IMPL->setAttrWithSetterException(newAttrWithSetterException, ec);
    369     WebCore::raiseOnDOMError(ec);
    370 }
    371 
    372 - (NSString *)stringAttrWithGetterException
    373 {
    374     WebCore::JSMainThreadNullState state;
    375     WebCore::ExceptionCode ec = 0;
    376     NSString *result = IMPL->stringAttrWithGetterException(ec);
    377     WebCore::raiseOnDOMError(ec);
    378     return result;
    379 }
    380 
    381 - (void)setStringAttrWithGetterException:(NSString *)newStringAttrWithGetterException
    382 {
    383     WebCore::JSMainThreadNullState state;
    384     WebCore::ExceptionCode ec = 0;
    385     IMPL->setStringAttrWithGetterException(newStringAttrWithGetterException, ec);
    386     WebCore::raiseOnDOMError(ec);
    387 }
    388 
    389 - (NSString *)stringAttrWithSetterException
    390 {
    391     WebCore::JSMainThreadNullState state;
    392     return IMPL->stringAttrWithSetterException();
    393 }
    394 
    395 - (void)setStringAttrWithSetterException:(NSString *)newStringAttrWithSetterException
    396 {
    397     WebCore::JSMainThreadNullState state;
    398     WebCore::ExceptionCode ec = 0;
    399     IMPL->setStringAttrWithSetterException(newStringAttrWithSetterException, ec);
    400     WebCore::raiseOnDOMError(ec);
    401 }
    402 
    403 - (int)customAttr
    404 {
    405     WebCore::JSMainThreadNullState state;
    406     return IMPL->customAttr();
    407 }
    408 
    409 - (void)setCustomAttr:(int)newCustomAttr
    410 {
    411     WebCore::JSMainThreadNullState state;
    412     IMPL->setCustomAttr(newCustomAttr);
    413 }
    414 
    415 - (NSString *)scriptStringAttr
    416 {
    417     WebCore::JSMainThreadNullState state;
    418     return IMPL->scriptStringAttr();
    419 }
    420 
    421 #if ENABLE(Condition1)
    422 - (int)conditionalAttr1
    423 {
    424     WebCore::JSMainThreadNullState state;
    425     return IMPL->conditionalAttr1();
    426 }
    427 
    428 - (void)setConditionalAttr1:(int)newConditionalAttr1
    429 {
    430     WebCore::JSMainThreadNullState state;
    431     IMPL->setConditionalAttr1(newConditionalAttr1);
    432 }
    433 #endif
    434 
    435 #if ENABLE(Condition1) && ENABLE(Condition2)
    436 - (int)conditionalAttr2
    437 {
    438     WebCore::JSMainThreadNullState state;
    439     return IMPL->conditionalAttr2();
    440 }
    441 
    442 - (void)setConditionalAttr2:(int)newConditionalAttr2
    443 {
    444     WebCore::JSMainThreadNullState state;
    445     IMPL->setConditionalAttr2(newConditionalAttr2);
    446 }
    447 #endif
    448 
    449 #if ENABLE(Condition1) || ENABLE(Condition2)
    450 - (int)conditionalAttr3
    451 {
    452     WebCore::JSMainThreadNullState state;
    453     return IMPL->conditionalAttr3();
    454 }
    455 
    456 - (void)setConditionalAttr3:(int)newConditionalAttr3
    457 {
    458     WebCore::JSMainThreadNullState state;
    459     IMPL->setConditionalAttr3(newConditionalAttr3);
    460 }
    461 #endif
    462 
    463 - (int)descriptionName
    464 {
    465     WebCore::JSMainThreadNullState state;
    466     return IMPL->description();
    467 }
    468 
    469 - (int)idName
    470 {
    471     WebCore::JSMainThreadNullState state;
    472     return IMPL->id();
    473 }
    474 
    475 - (void)setIdName:(int)newIdName
    476 {
    477     WebCore::JSMainThreadNullState state;
    478     IMPL->setId(newIdName);
    479 }
    480 
    481 - (NSString *)hashName
    482 {
    483     WebCore::JSMainThreadNullState state;
    484     return IMPL->hash();
    485 }
    486 
    487 - (void)voidMethod
    488 {
    489     WebCore::JSMainThreadNullState state;
    490     IMPL->voidMethod();
    491 }
    492 
    493 - (void)voidMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
    494 {
    495     WebCore::JSMainThreadNullState state;
    496     IMPL->voidMethodWithArgs(intArg, strArg, core(objArg));
    497 }
    498 
    499 - (int)intMethod
    500 {
    501     WebCore::JSMainThreadNullState state;
    502     return IMPL->intMethod();
    503 }
    504 
    505 - (int)intMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
    506 {
    507     WebCore::JSMainThreadNullState state;
    508     return IMPL->intMethodWithArgs(intArg, strArg, core(objArg));
    509 }
    510 
    511 - (DOMTestObj *)objMethod
    512 {
    513     WebCore::JSMainThreadNullState state;
    514     return kit(WTF::getPtr(IMPL->objMethod()));
    515 }
    516 
    517 - (DOMTestObj *)objMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
    518 {
    519     WebCore::JSMainThreadNullState state;
    520     return kit(WTF::getPtr(IMPL->objMethodWithArgs(intArg, strArg, core(objArg))));
    521 }
    522 
    523 - (DOMTestObj *)methodThatRequiresAllArgs:(NSString *)strArg objArg:(DOMTestObj *)objArg
    524 {
    525     WebCore::JSMainThreadNullState state;
    526     return kit(WTF::getPtr(IMPL->methodThatRequiresAllArgs(strArg, core(objArg))));
    527 }
    528 
    529 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg
    530 {
    531     WebCore::JSMainThreadNullState state;
    532     WebCore::ExceptionCode ec = 0;
    533     DOMTestObj *result = kit(WTF::getPtr(IMPL->methodThatRequiresAllArgsAndThrows(strArg, core(objArg), ec)));
    534     WebCore::raiseOnDOMError(ec);
    535     return result;
    536 }
    537 
    538 - (void)serializedValue:(NSString *)serializedArg
    539 {
    540     WebCore::JSMainThreadNullState state;
    541     IMPL->serializedValue(WebCore::SerializedScriptValue::create(WTF::String(serializedArg)));
    542 }
    543 
    544 - (void)idbKey:(DOMIDBKey *)key
    545 {
    546     WebCore::JSMainThreadNullState state;
    547     IMPL->idbKey(core(key));
    548 }
    549 
    550 - (void)optionsObject:(DOMOptionsObject *)oo ooo:(DOMOptionsObject *)ooo
    551 {
    552     WebCore::JSMainThreadNullState state;
    553     IMPL->optionsObject(core(oo), core(ooo));
    554 }
    555 
    556 - (void)methodWithException
    557 {
    558     WebCore::JSMainThreadNullState state;
    559     WebCore::ExceptionCode ec = 0;
    560     IMPL->methodWithException(ec);
    561     WebCore::raiseOnDOMError(ec);
    562 }
    563 
    564 - (void)customMethod
    565 {
    566     WebCore::JSMainThreadNullState state;
    567     IMPL->customMethod();
    568 }
    569 
    570 - (void)customMethodWithArgs:(int)intArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg
    571 {
    572     WebCore::JSMainThreadNullState state;
    573     IMPL->customMethodWithArgs(intArg, strArg, core(objArg));
    574 }
    575 
    576 - (void)customArgsAndException:(DOMlog *)intArg
    577 {
    578     WebCore::JSMainThreadNullState state;
    579     WebCore::ExceptionCode ec = 0;
    580     IMPL->customArgsAndException(core(intArg), ec);
    581     WebCore::raiseOnDOMError(ec);
    582 }
    583 
    584 - (void)addEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
    585 {
    586     WebCore::JSMainThreadNullState state;
    587     RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener);
    588     IMPL->addEventListener(type, WTF::getPtr(nativeEventListener), useCapture);
    589 }
    590 
    591 - (void)removeEventListener:(NSString *)type listener:(id <DOMEventListener>)listener useCapture:(BOOL)useCapture
    592 {
    593     WebCore::JSMainThreadNullState state;
    594     RefPtr<WebCore::EventListener> nativeEventListener = WebCore::ObjCEventListener::wrap(listener);
    595     IMPL->removeEventListener(type, WTF::getPtr(nativeEventListener), useCapture);
    596 }
    597 
    598 - (void)withDynamicFrame
    599 {
    600     WebCore::JSMainThreadNullState state;
    601     IMPL->withDynamicFrame();
    602 }
    603 
    604 - (void)withDynamicFrameAndArg:(int)intArg
    605 {
    606     WebCore::JSMainThreadNullState state;
    607     IMPL->withDynamicFrameAndArg(intArg);
    608 }
    609 
    610 - (void)withDynamicFrameAndOptionalArg:(int)intArg optionalArg:(int)optionalArg
    611 {
    612     WebCore::JSMainThreadNullState state;
    613     IMPL->withDynamicFrameAndOptionalArg(intArg, optionalArg);
    614 }
    615 
    616 - (void)withDynamicFrameAndUserGesture:(int)intArg
    617 {
    618     WebCore::JSMainThreadNullState state;
    619     IMPL->withDynamicFrameAndUserGesture(intArg);
    620 }
    621 
    622 - (void)withDynamicFrameAndUserGestureASAD:(int)intArg optionalArg:(int)optionalArg
    623 {
    624     WebCore::JSMainThreadNullState state;
    625     IMPL->withDynamicFrameAndUserGestureASAD(intArg, optionalArg);
    626 }
    627 
    628 - (void)withScriptStateVoid
    629 {
    630     WebCore::JSMainThreadNullState state;
    631     IMPL->withScriptStateVoid();
    632 }
    633 
    634 - (DOMTestObj *)withScriptStateObj
    635 {
    636     WebCore::JSMainThreadNullState state;
    637     return kit(WTF::getPtr(IMPL->withScriptStateObj()));
    638 }
    639 
    640 - (void)withScriptStateVoidException
    641 {
    642     WebCore::JSMainThreadNullState state;
    643     WebCore::ExceptionCode ec = 0;
    644     IMPL->withScriptStateVoidException(ec);
    645     WebCore::raiseOnDOMError(ec);
    646 }
    647 
    648 - (DOMTestObj *)withScriptStateObjException
    649 {
    650     WebCore::JSMainThreadNullState state;
    651     WebCore::ExceptionCode ec = 0;
    652     DOMTestObj *result = kit(WTF::getPtr(IMPL->withScriptStateObjException(ec)));
    653     WebCore::raiseOnDOMError(ec);
    654     return result;
    655 }
    656 
    657 - (void)withScriptExecutionContext
    658 {
    659     WebCore::JSMainThreadNullState state;
    660     IMPL->withScriptExecutionContext();
    661 }
    662 
    663 - (void)methodWithOptionalArg:(int)opt
    664 {
    665     WebCore::JSMainThreadNullState state;
    666     IMPL->methodWithOptionalArg(opt);
    667 }
    668 
    669 - (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt
    670 {
    671     WebCore::JSMainThreadNullState state;
    672     IMPL->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt);
    673 }
    674 
    675 - (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2
    676 {
    677     WebCore::JSMainThreadNullState state;
    678     IMPL->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2);
    679 }
    680 
    681 - (void)classMethod
    682 {
    683     WebCore::JSMainThreadNullState state;
    684     IMPL->classMethod();
    685 }
    686 
    687 - (int)classMethodWithOptional:(int)arg
    688 {
    689     WebCore::JSMainThreadNullState state;
    690     return IMPL->classMethodWithOptional(arg);
    691 }
    692 
    693 @end
    694 
    695 WebCore::TestObj* core(DOMTestObj *wrapper)
    696 {
    697     return wrapper ? reinterpret_cast<WebCore::TestObj*>(wrapper->_internal) : 0;
    698 }
    699 
    700 DOMTestObj *kit(WebCore::TestObj* value)
    701 {
    702     { DOM_ASSERT_MAIN_THREAD(); WebCoreThreadViolationCheckRoundOne(); };
    703     if (!value)
    704         return nil;
    705     if (DOMTestObj *wrapper = getDOMWrapper(value))
    706         return [[wrapper retain] autorelease];
    707     DOMTestObj *wrapper = [[DOMTestObj alloc] _init];
    708     wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(value);
    709     value->ref();
    710     addDOMWrapper(wrapper, value);
    711     return [wrapper autorelease];
    712 }
    713