[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
abarth at webkit.org
abarth at webkit.org
Wed Dec 22 12:29:27 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 7c5e65d51de0e8d7cb33bad75769c978455c4268
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 24 18:37:32 2010 +0000
2010-08-24 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
Deploy adoptPtr in WebCore/editing
https://bugs.webkit.org/show_bug.cgi?id=44501
* editing/Editor.cpp:
(WebCore::Editor::Editor):
* editing/TextIterator.cpp:
(WebCore::plainTextToMallocAllocatedBuffer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 55b07a4..dec181e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,18 @@
Reviewed by Eric Seidel.
+ Deploy adoptPtr in WebCore/editing
+ https://bugs.webkit.org/show_bug.cgi?id=44501
+
+ * editing/Editor.cpp:
+ (WebCore::Editor::Editor):
+ * editing/TextIterator.cpp:
+ (WebCore::plainTextToMallocAllocatedBuffer):
+
+2010-08-24 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
Deploy adoptPtr in WebCore/history
https://bugs.webkit.org/show_bug.cgi?id=44502
diff --git a/WebCore/editing/Editor.cpp b/WebCore/editing/Editor.cpp
index fd4c210..2528dd3 100644
--- a/WebCore/editing/Editor.cpp
+++ b/WebCore/editing/Editor.cpp
@@ -997,12 +997,12 @@ void Editor::reappliedEditing(PassRefPtr<EditCommand> cmd)
Editor::Editor(Frame* frame)
: m_frame(frame)
- , m_deleteButtonController(new DeleteButtonController(frame))
+ , m_deleteButtonController(adoptPtr(new DeleteButtonController(frame)))
, m_ignoreCompositionSelectionChange(false)
, m_shouldStartNewKillRingSequence(false)
// This is off by default, since most editors want this behavior (this matches IE but not FF).
, m_shouldStyleWithCSS(false)
- , m_killRing(new KillRing)
+ , m_killRing(adoptPtr(new KillRing))
{
}
diff --git a/WebCore/editing/TextIterator.cpp b/WebCore/editing/TextIterator.cpp
index 39013c1..5dc43a4 100644
--- a/WebCore/editing/TextIterator.cpp
+++ b/WebCore/editing/TextIterator.cpp
@@ -2223,7 +2223,7 @@ UChar* plainTextToMallocAllocatedBuffer(const Range* r, unsigned& bufferLength,
static const unsigned cMaxSegmentSize = 1 << 16;
bufferLength = 0;
typedef pair<UChar*, unsigned> TextSegment;
- Vector<TextSegment>* textSegments = 0;
+ OwnPtr<Vector<TextSegment> > textSegments;
Vector<UChar> textBuffer;
textBuffer.reserveInitialCapacity(cMaxSegmentSize);
for (TextIterator it(r, isDisplayString ? TextIteratorDefaultBehavior : TextIteratorEmitsTextsWithoutTranscoding); !it.atEnd(); it.advance()) {
@@ -2233,7 +2233,7 @@ UChar* plainTextToMallocAllocatedBuffer(const Range* r, unsigned& bufferLength,
goto exit;
memcpy(newSegmentBuffer, textBuffer.data(), textBuffer.size() * sizeof(UChar));
if (!textSegments)
- textSegments = new Vector<TextSegment>;
+ textSegments = adoptPtr(new Vector<TextSegment>);
textSegments->append(make_pair(newSegmentBuffer, (unsigned)textBuffer.size()));
textBuffer.clear();
}
@@ -2267,7 +2267,7 @@ exit:
unsigned size = textSegments->size();
for (unsigned i = 0; i < size; ++i)
free(textSegments->at(i).first);
- delete textSegments;
+ textSegments.clear();
}
if (isDisplayString && r->ownerDocument())
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list