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

Unified Diff: Source/modules/encoding/TextEncoder.cpp

Issue 234863002: Oilpan: Enable Oilpan in modules/encoding (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/encoding/TextEncoder.h ('k') | Source/modules/encoding/TextEncoder.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/encoding/TextEncoder.cpp
diff --git a/Source/modules/encoding/TextEncoder.cpp b/Source/modules/encoding/TextEncoder.cpp
index 741314b091a1698b05369c9ef4761e4f730e60a5..2cfa360b6014cda4cda9300cdb3684d13847cc5b 100644
--- a/Source/modules/encoding/TextEncoder.cpp
+++ b/Source/modules/encoding/TextEncoder.cpp
@@ -39,23 +39,23 @@
namespace WebCore {
-PassRefPtrWillBeRawPtr<TextEncoder> TextEncoder::create(const String& utfLabel, ExceptionState& exceptionState)
+TextEncoder* TextEncoder::create(const String& utfLabel, ExceptionState& exceptionState)
{
const String& encodingLabel = utfLabel.isNull() ? String("utf-8") : utfLabel;
WTF::TextEncoding encoding(encodingLabel);
if (!encoding.isValid()) {
exceptionState.throwTypeError("The encoding label provided ('" + encodingLabel + "') is invalid.");
- return nullptr;
+ return 0;
}
String name(encoding.name());
if (name != "UTF-8" && name != "UTF-16LE" && name != "UTF-16BE") {
exceptionState.throwTypeError("The encoding provided ('" + encodingLabel + "') is not one of 'utf-8', 'utf-16', or 'utf-16be'.");
- return nullptr;
+ return 0;
}
- return adoptRefWillBeNoop(new TextEncoder(encoding.name()));
+ return new TextEncoder(encoding.name());
}
TextEncoder::TextEncoder(const String& encoding)
« no previous file with comments | « Source/modules/encoding/TextEncoder.h ('k') | Source/modules/encoding/TextEncoder.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698