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

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

Powered by Google App Engine
This is Rietveld 408576698