Bug 120325 - Editor::spellChecker() should return a reference
Summary: Editor::spellChecker() should return a reference
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-26 14:46 PDT by Sam Weinig
Modified: 2013-08-26 15:17 PDT (History)
0 users

See Also:


Attachments
Patch (6.80 KB, patch)
2013-08-26 14:47 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2013-08-26 14:46:46 PDT
Editor::spellChecker() should return a reference
Comment 1 Sam Weinig 2013-08-26 14:47:36 PDT
Created attachment 209679 [details]
Patch
Comment 2 Andreas Kling 2013-08-26 14:49:25 PDT
Comment on attachment 209679 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=209679&action=review

r=me

> Source/WebCore/editing/Editor.h:332
> -    SpellChecker* spellChecker() const { return m_spellChecker.get(); }
> +    SpellChecker& spellChecker() const { return *m_spellChecker.get(); }

You should make m_spellChecker a "const OwnPtr" so it can't be assigned to after construction, too.
Comment 3 Sam Weinig 2013-08-26 14:49:27 PDT
Committed r154643: <http://trac.webkit.org/changeset/154643>
Comment 4 Darin Adler 2013-08-26 15:17:15 PDT
Comment on attachment 209679 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=209679&action=review

>> Source/WebCore/editing/Editor.h:332
>> +    SpellChecker& spellChecker() const { return *m_spellChecker.get(); }
> 
> You should make m_spellChecker a "const OwnPtr" so it can't be assigned to after construction, too.

No need for get() here.