webengine/device/src/ServiceEventHandler.cpp
branchRCL_3
changeset 99 ca6d8a014f4b
parent 0 dd21522fd290
equal deleted inserted replaced
95:d96eed154187 99:ca6d8a014f4b
    39     ExecState* execState, const JSObject* aInterfaceFunc, const JSValue* aCallbackFunc, const TInt aTransId )
    39     ExecState* execState, const JSObject* aInterfaceFunc, const JSValue* aCallbackFunc, const TInt aTransId )
    40     : iGlobalExecState( execState )
    40     : iGlobalExecState( execState )
    41     {
    41     {
    42     iInterfaceFunc = (JSObject*)aInterfaceFunc;
    42     iInterfaceFunc = (JSObject*)aInterfaceFunc;
    43     iCallbackFunc = (JSObject*)aCallbackFunc;
    43     iCallbackFunc = (JSObject*)aCallbackFunc;
       
    44     KJS::Collector::protect(iCallbackFunc);
    44     iTransId = aTransId;
    45     iTransId = aTransId;
    45     }
    46     }
    46 
    47 
    47 
    48 
    48 // ----------------------------------------------------------------------------
    49 // ----------------------------------------------------------------------------
    52 //
    53 //
    53 // ----------------------------------------------------------------------------
    54 // ----------------------------------------------------------------------------
    54 //
    55 //
    55 ServiceEventHandler::~ServiceEventHandler()
    56 ServiceEventHandler::~ServiceEventHandler()
    56     {
    57     {
       
    58     KJS::Collector::unprotect(iCallbackFunc);
    57     }
    59     }
    58 
    60 
    59 // ----------------------------------------------------------------------------
    61 // ----------------------------------------------------------------------------
    60 // ServiceEventHandler::InvokeCall
    62 // ServiceEventHandler::InvokeCall
    61 // Caller supplies a KJS::List as the param
    63 // Caller supplies a KJS::List as the param