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

Unified Diff: third_party/WebKit/Source/wtf/Int32Array.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/Int16Array.h ('k') | third_party/WebKit/Source/wtf/Int8Array.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Int32Array.h
diff --git a/third_party/WebKit/Source/wtf/Int32Array.h b/third_party/WebKit/Source/wtf/Int32Array.h
index 39b98e65c838c48205b151f93fc87a642962f198..d27131c22bb1016027ea4cd74735c1f1dc879978 100644
--- a/third_party/WebKit/Source/wtf/Int32Array.h
+++ b/third_party/WebKit/Source/wtf/Int32Array.h
@@ -33,8 +33,9 @@ namespace WTF {
class Int32Array final : public IntegralTypedArrayBase<int> {
public:
- static inline PassRefPtr<Int32Array> create(unsigned length);
- static inline PassRefPtr<Int32Array> create(const int* array, unsigned length);
+ static inline PassRefPtr<Int32Array> createOrNull(unsigned length);
+ static inline PassRefPtr<Int32Array> createOrNull(const int* array, unsigned length);
+ static inline PassRefPtr<Int32Array> deprecatedCreateOrCrash(const int* array, unsigned length);
static inline PassRefPtr<Int32Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
using TypedArrayBase<int>::set;
@@ -51,14 +52,19 @@ private:
friend class TypedArrayBase<int>;
};
-PassRefPtr<Int32Array> Int32Array::create(unsigned length)
+PassRefPtr<Int32Array> Int32Array::createOrNull(unsigned length)
{
- return TypedArrayBase<int>::create<Int32Array>(length);
+ return TypedArrayBase<int>::createOrNull<Int32Array>(length);
}
-PassRefPtr<Int32Array> Int32Array::create(const int* array, unsigned length)
+PassRefPtr<Int32Array> Int32Array::createOrNull(const int* array, unsigned length)
{
- return TypedArrayBase<int>::create<Int32Array>(array, length);
+ return TypedArrayBase<int>::createOrNull<Int32Array>(array, length);
+}
+
+PassRefPtr<Int32Array> Int32Array::deprecatedCreateOrCrash(const int* array, unsigned length)
+{
+ return TypedArrayBase<int>::deprecatedCreateOrCrash<Int32Array>(array, length);
}
PassRefPtr<Int32Array> Int32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
« no previous file with comments | « third_party/WebKit/Source/wtf/Int16Array.h ('k') | third_party/WebKit/Source/wtf/Int8Array.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698