Skip to content
  • commit-queue@webkit.org's avatar
    Add PassThis=* to support the callbacks which requires to pass "this" value. · d8d2757f
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=84232
    
    Patch by Vineet Chaudhary <rgf748@motorola.com> on 2012-04-18
    Reviewed by Kentaro Hara.
    
    Adding PassThisToCallback=XXX to attributes will be useful for the callbacks which requires to pass "this".
    This will help to identify the type(XXX) of "this" value in codegenerator.
    
    Tests: bindings/scripts/test/TestCallback.idl
    
    * bindings/scripts/CodeGeneratorJS.pm:
    (GenerateCallbackImplementation): Modified codegenerator to support [PassThisToCallback]
    * bindings/scripts/CodeGeneratorV8.pm:
    (GenerateCallbackImplementation): Ditto.
    * bindings/scripts/IDLAttributes.txt: Added PassThisToCallback=*
    * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: Modofied results from run-bindings-tests.
    (WebDOMTestCallback::callbackWithBoolean):
    (WebDOMTestCallback::callbackRequiresThisToPass):
    * bindings/scripts/test/CPP/WebDOMTestCallback.h: Ditto.
    (WebDOMTestCallback):
    * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: Ditto.
    (webkit_dom_test_callback_callback_with_boolean):
    (webkit_dom_test_callback_callback_requires_this_to_pass):
    * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: Ditto.
    * bindings/scripts/test/JS/JSTestCallback.cpp: Ditto.
    (WebCore::JSTestCallback::callbackWithBoolean):
    (WebCore):
    (WebCore::JSTestCallback::callbackRequiresThisToPass):
    * bindings/scripts/test/JS/JSTestCallback.h: Ditto.
    (JSTestCallback):
    * bindings/scripts/test/ObjC/DOMTestCallback.h: Ditto.
    * bindings/scripts/test/ObjC/DOMTestCallback.mm: Ditto.
    (-[DOMTestCallback callbackWithBoolean:]):
    (-[DOMTestCallback callbackRequiresThisToPass:thisClassParam:]):
    * bindings/scripts/test/TestCallback.idl: Added test to verify generated code.
    * bindings/scripts/test/V8/V8TestCallback.cpp: Ditto.
    (WebCore::V8TestCallback::callbackWithBoolean):
    (WebCore):
    (WebCore::V8TestCallback::callbackRequiresThisToPass):
    * bindings/scripts/test/V8/V8TestCallback.h: Ditto.
    (V8TestCallback):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@114502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    d8d2757f