Changeset 159351 in webkit for trunk/Source/JavaScriptCore/API/ObjCCallbackFunction.mm
- Timestamp:
- Nov 15, 2013, 11:53:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/ObjCCallbackFunction.mm
r158695 r159351 32 32 #import "APICast.h" 33 33 #import "APIShims.h" 34 #import "DelayedReleaseScope.h" 34 35 #import "Error.h" 35 36 #import "JSCJSValueInlines.h" … … 406 407 } 407 408 408 ~ObjCCallbackFunctionImpl()409 { 410 // We need to explicit y release the target since we didn't call409 void destroy(Heap& heap) 410 { 411 // We need to explicitly release the target since we didn't call 411 412 // -retainArguments on m_invocation (and we don't want to do so). 412 413 if (m_type == CallbackBlock || m_type == CallbackClassMethod) 413 [[m_invocation.get() target] release];414 heap.releaseSoon(adoptNS([m_invocation.get() target])); 414 415 [m_instanceClass release]; 415 416 } … … 521 522 void ObjCCallbackFunction::destroy(JSCell* cell) 522 523 { 523 static_cast<ObjCCallbackFunction*>(cell)->ObjCCallbackFunction::~ObjCCallbackFunction(); 524 ObjCCallbackFunction& function = *jsCast<ObjCCallbackFunction*>(cell); 525 function.impl()->destroy(*Heap::heap(cell)); 526 function.~ObjCCallbackFunction(); 524 527 } 525 528
Note:
See TracChangeset
for help on using the changeset viewer.