Changeset 163628 in webkit
- Timestamp:
- Feb 7, 2014 10:31:29 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r163627 r163628 1 2014-02-07 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] WKWebProcessPlugInNodeHandle methods leak and may crash 4 https://bugs.webkit.org/show_bug.cgi?id=128365 5 6 Reviewed by Anders Carlsson. 7 8 * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm: 9 (+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]): Null-check the result 10 of InjectedBundleNodeHandle::getOrCreate, and autorelease the return value. 11 (-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]): Null-check the result of 12 InjectedBundleNodeHandle::htmlIFrameElementContentFrame, and autorelease the return value. 13 1 14 2014-02-06 Brady Eidson <beidson@apple.com> 2 15 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm
r163412 r163628 49 49 JSObjectRef objectRef = JSValueToObject(contextRef, [value JSValueRef], 0); 50 50 RefPtr<InjectedBundleNodeHandle> nodeHandle = InjectedBundleNodeHandle::getOrCreate(contextRef, objectRef); 51 if (!nodeHandle) 52 return nil; 51 53 52 return wrapper(*nodeHandle.release().leakRef());54 return [wrapper(*nodeHandle.release().leakRef()) autorelease]; 53 55 } 54 56 … … 56 58 { 57 59 RefPtr<WebFrame> frame = _nodeHandle->htmlIFrameElementContentFrame(); 58 return wrapper(*frame.release().leakRef()); 60 if (!frame) 61 return nil; 62 63 return [wrapper(*frame.release().leakRef()) autorelease]; 59 64 } 60 65
Note: See TracChangeset
for help on using the changeset viewer.