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

Unified Diff: third_party/WebKit/Source/wtf/Int8Array.h

Issue 1414553002: Fix out-of-memory crashes related to ArrayBuffer allocation Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+more tweaks Created 5 years, 1 month 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 | « third_party/WebKit/Source/wtf/Int32Array.h ('k') | third_party/WebKit/Source/wtf/TypedArrayBase.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Int8Array.h
diff --git a/third_party/WebKit/Source/wtf/Int8Array.h b/third_party/WebKit/Source/wtf/Int8Array.h
index 698504fd61133f99ff6747828a007ff6395933fb..74c3890fb2aa922e4a9050753acc3f88a5e46448 100644
--- a/third_party/WebKit/Source/wtf/Int8Array.h
+++ b/third_party/WebKit/Source/wtf/Int8Array.h
@@ -35,8 +35,9 @@ class ArrayBuffer;
class Int8Array final : public IntegralTypedArrayBase<signed char> {
public:
- static inline PassRefPtr<Int8Array> create(unsigned length);
- static inline PassRefPtr<Int8Array> create(const signed char* array, unsigned length);
+ static inline PassRefPtr<Int8Array> createOrNull(unsigned length);
+ static inline PassRefPtr<Int8Array> createOrNull(const signed char* array, unsigned length);
+ static inline PassRefPtr<Int8Array> deprecatedCreateOrCrash(const signed char* array, unsigned length);
static inline PassRefPtr<Int8Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
using TypedArrayBase<signed char>::set;
@@ -53,14 +54,19 @@ private:
friend class TypedArrayBase<signed char>;
};
-PassRefPtr<Int8Array> Int8Array::create(unsigned length)
+PassRefPtr<Int8Array> Int8Array::createOrNull(unsigned length)
{
- return TypedArrayBase<signed char>::create<Int8Array>(length);
+ return TypedArrayBase<signed char>::createOrNull<Int8Array>(length);
}
-PassRefPtr<Int8Array> Int8Array::create(const signed char* array, unsigned length)
+PassRefPtr<Int8Array> Int8Array::createOrNull(const signed char* array, unsigned length)
{
- return TypedArrayBase<signed char>::create<Int8Array>(array, length);
+ return TypedArrayBase<signed char>::createOrNull<Int8Array>(array, length);
+}
+
+PassRefPtr<Int8Array> Int8Array::deprecatedCreateOrCrash(const signed char* array, unsigned length)
+{
+ return TypedArrayBase<signed char>::deprecatedCreateOrCrash<Int8Array>(array, length);
}
PassRefPtr<Int8Array> Int8Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
« no previous file with comments | « third_party/WebKit/Source/wtf/Int32Array.h ('k') | third_party/WebKit/Source/wtf/TypedArrayBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698