Changes between Version 32 and Version 33 of WebKitIDL


Ignore:
Timestamp:
Feb 15, 2012 10:34:00 PM (12 years ago)
Author:
haraken@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WebKitIDL

    v32 v33  
    678678=== * [CustomConstructor](i), [JSCustomConstructor](i), [V8CustomConstructor](i), [ConstructorParameters](i) ===
    679679
    680 Summary: They allow to write custom bindings for constructors.
     680Summary: They allow us to write custom bindings for constructors.
    681681
    682682Usage: They can specified on interfaces.
     
    698698 * [JSCustomConstructor] on an interface indicates that you want to write JavaScriptCore custom bindings for the constructor.
    699699 * [V8CustomConstructor] on an interface indicates that you want to write V8 custom bindings for the constructor.
    700  * [CustomConstructor] is equivalent to [JSCustomConstructor] and [V8CustomConstructor].
     700 * [CustomConstructor] is equivalent to [JSCustomConstructor, V8CustomConstructor].
    701701
    702702For example, if you specify [Constructor, JSCustomConstructor],
     
    809809=== * [CustomToJSObject](i), [JSCustomToJSObject](i), [V8CustomToJSObject](i) ===
    810810
    811 Summary: It allows us to write custom
    812 
    813 Usage:
     811Summary: They allow us to write custom toJS() or toV8().
     812
     813Usage: They can be specified on interfaces:
     814{{{
     815    interface [
     816        CustomToJSObject
     817    ] XXX {
     818    }
     819}}}
     820
     821 * [JSCustomToJSObject] on an interface indicates that you want to write custom toJS().
     822 * [V8CustomToJSObject] on an interface indicates that you want to write custom toV8().
     823 * [CustomToJSObject] is equivalent to [JSCustomToJSObject, V8CustomToJSObject].
     824
     825By default, toJS() and toV8() are automatically generated in JSXXX.h and JSXXX.cpp or V8XXX.h and V8XXX.cpp.
     826With [CustomToJSObject]/[JSCustomToJSObject]/[V8CustomToJSObject],
     827you can write custom toJS() or toV8() in WebCore/bindings/js/JSXXXCustom.cpp or WebCore/bindings/v8/custom/V8XXXCustom.cpp.
    814828
    815829=== * [CheckDomainSecurity](i), [DoNotCheckDomainSecurity](m,a), [DoNotCheckDomainSecurityOnGetter](a), [DoNotCheckDomainSecurityOnSetter](a) ===
     
    843857=== * [CustomCall](i) ===
    844858
    845 === * [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomGetOwnPropertySlotAndDescriptor](i), [JSCustomDefineOwnPropertyOnPrototype](i) ===
     859=== * [JSCustomToNativeObject](i), [JSCustomFinalize](i), [JSCustomIsReachable](i), [JSCustomMarkFunction](i), [JSCustomNamedGetterOnPrototype](i), [JSCustomPushEventHandlerScope](i), [JSCustomDefineOwnProperty](i), [JSCustomDefineOwnPropertyOnPrototype](i), [JSCustomGetOwnPropertySlotAndDescriptor](i) ===
     860
     861Summary: They allow us to write custom code for the JavaScriptCore code which would be generated automatically by default.
     862
     863Usage: They can be specified on interfaces:
     864{{{
     865    interface [
     866        JSCustomToNativeObject,
     867        JSCustomFinalize,
     868        JSCustomIsReachable,
     869        JSCustomMarkFunction,
     870        JSCustomNamedGetterOnPrototype,
     871        JSCustomPushEventHandlerScope,
     872        JSCustomDefineOwnProperty,
     873        JSCustomDefineOwnPropertyOnPrototype,
     874        JSCustomGetOwnPropertySlotAndDescriptor
     875    ] XXX {
     876    }
     877}}}
     878
     879You can write the following custom code in WebCore/bindings/js/JSXXXCustom.cpp.
     880Refer to use cases in WebCore/bindings/js/JSXXXCustom.cpp for more details.
     881
     882 * With [JSCustomToNativeObject], you can write custom toXXX(...):
     883{{{
     884    PassRefPtr<XXX> toXXX(JSGlobalData& globalData, JSValue value)
     885    {
     886        ...;
     887    }
     888}}}
     889 * With [JSCustomFinalize], you can write custom JSXXXOwner::finalize(...):
     890{{{
     891    void JSXXXOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
     892    {
     893        ...;
     894    }
     895}}}
     896* With [JSCustomIsReachable], you can write custom JSXXXOwner::isReachableFromOpaqueRoots(...):
     897{{{
     898    bool JSXXXOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void* context, SlotVisitor& visitor)
     899    {
     900        ...;
     901    }
     902}}}
     903 * With [JSCustomMarkFunction], you can write custom JSXXX::visitChildren(...):
     904{{{
     905    void JSXXX::visitChildren(JSCell* cell, SlotVisitor& visitor)
     906    {
     907        ...;
     908    }
     909}}}
     910 * With [JSCustomNamedGetterOnPrototype], you can write custom JSXXX::putDelegate(...):
     911{{{
     912    bool JSXXX::putDelegate(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
     913    {
     914        ...;
     915    }
     916}}}
     917 * With [JSCustomPushEventHandlerScope], you can write custom JSXXX::pushEventHandlerScope(...):
     918{{{
     919    ScopeChainNode* JSXXX::pushEventHandlerScope(ExecState* exec, ScopeChainNode* node) const
     920    {
     921        ...;
     922    }
     923}}}
     924 * With [JSCustomDefineOwnProperty], you can write custom JSXXX::defineOwnProperty(...):
     925{{{
     926    bool JSXXX::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool throwException)
     927    {
     928        ...;
     929    }
     930}}}
     931 * With [JSCustomDefineOwnPropertyOnPrototype], you can write custom JSXXXPrototype::defineOwnProperty(...):
     932{{{
     933    bool JSXXXPrototype::defineOwnProperty(JSObject* object, ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor, bool throwException)
     934    {
     935        ...;
     936    }
     937}}}
     938 * With [JSCustomGetOwnPropertySlotAndDescriptor], you can write custom JSXXX::getOwnPropertySlotDelegate(...) and JSXXX::getOwnPropertyDescriptorDelegate(...):
     939{{{
     940    bool JSXXX::getOwnPropertySlotDelegate(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
     941    {
     942        ...;
     943    }
     944
     945    bool JSXXX::getOwnPropertyDescriptorDelegate(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
     946    {
     947        ...;
     948    }
     949}}}
    846950
    847951=== * [JSCustomHeader](i) ===