Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: Source/WebCore/platform/chromium/ClipboardChromium.cpp

Issue 11194057: Merge 129962 - REGRESSION(r122215) - CachedImage::likelyToBeUsedSoon crashes on accessing a deleted… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ManualTests/drag-image-no-crash.html ('k') | Source/WebCore/platform/mac/ClipboardMac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google Inc. 3 * Copyright (C) 2008, 2009 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 ClipboardAccessPolicy policy, 220 ClipboardAccessPolicy policy,
221 Frame* frame) 221 Frame* frame)
222 : Clipboard(policy, clipboardType) 222 : Clipboard(policy, clipboardType)
223 , m_dataObject(dataObject) 223 , m_dataObject(dataObject)
224 , m_frame(frame) 224 , m_frame(frame)
225 { 225 {
226 } 226 }
227 227
228 ClipboardChromium::~ClipboardChromium() 228 ClipboardChromium::~ClipboardChromium()
229 { 229 {
230 if (m_dragImage)
231 m_dragImage->removeClient(this);
230 } 232 }
231 233
232 PassRefPtr<ClipboardChromium> ClipboardChromium::create(ClipboardType clipboardT ype, 234 PassRefPtr<ClipboardChromium> ClipboardChromium::create(ClipboardType clipboardT ype,
233 PassRefPtr<ChromiumDataObject> dataObject, ClipboardAccessPolicy policy, Fra me* frame) 235 PassRefPtr<ChromiumDataObject> dataObject, ClipboardAccessPolicy policy, Fra me* frame)
234 { 236 {
235 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra me)); 237 return adoptRef(new ClipboardChromium(clipboardType, dataObject, policy, fra me));
236 } 238 }
237 239
238 void ClipboardChromium::clearData(const String& type) 240 void ClipboardChromium::clearData(const String& type)
239 { 241 {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 PassRefPtr<DataTransferItemList> ClipboardChromium::items() 460 PassRefPtr<DataTransferItemList> ClipboardChromium::items()
459 { 461 {
460 // FIXME: According to the spec, we are supposed to return the same collecti on of items each 462 // FIXME: According to the spec, we are supposed to return the same collecti on of items each
461 // time. We now return a wrapper that always wraps the *same* set of items, so JS shouldn't be 463 // time. We now return a wrapper that always wraps the *same* set of items, so JS shouldn't be
462 // able to tell, but we probably still want to fix this. 464 // able to tell, but we probably still want to fix this.
463 return DataTransferItemListPolicyWrapper::create(this, m_dataObject); 465 return DataTransferItemListPolicyWrapper::create(this, m_dataObject);
464 } 466 }
465 #endif 467 #endif
466 468
467 } // namespace WebCore 469 } // namespace WebCore
OLDNEW
« no previous file with comments | « ManualTests/drag-image-no-crash.html ('k') | Source/WebCore/platform/mac/ClipboardMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698