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

Side by Side Diff: Source/wtf/ArrayBufferContents.h

Issue 1532413002: Added Dartium changes onto 45.0.2454.104 (Closed) Base URL: http://src.chromium.org/blink/branches/chromium/2454
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « Source/wtf/ArrayBuffer.h ('k') | Source/wtf/ArrayBufferContents.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ~DataHolder(); 87 ~DataHolder();
88 88
89 void allocateNew(unsigned sizeInBytes, SharingType isShared, Initializat ionPolicy); 89 void allocateNew(unsigned sizeInBytes, SharingType isShared, Initializat ionPolicy);
90 void adopt(void* data, unsigned sizeInBytes, SharingType isShared); 90 void adopt(void* data, unsigned sizeInBytes, SharingType isShared);
91 void copyMemoryTo(DataHolder& other); 91 void copyMemoryTo(DataHolder& other);
92 92
93 void* data() const { return m_data; } 93 void* data() const { return m_data; }
94 unsigned sizeInBytes() const { return m_sizeInBytes; } 94 unsigned sizeInBytes() const { return m_sizeInBytes; }
95 bool isShared() const { return m_isShared == Shared; } 95 bool isShared() const { return m_isShared == Shared; }
96 96
97 void setAllocated(bool allocate) { m_malloc = allocate; }
98 bool isAllocated() const { return m_malloc; }
99
97 private: 100 private:
98 void* m_data; 101 void* m_data;
102 bool m_malloc;
99 unsigned m_sizeInBytes; 103 unsigned m_sizeInBytes;
100 SharingType m_isShared; 104 SharingType m_isShared;
101 }; 105 };
102 106
103 RefPtr<DataHolder> m_holder; 107 RefPtr<DataHolder> m_holder;
104 static AdjustAmountOfExternalAllocatedMemoryFunction s_adjustAmountOfExterna lAllocatedMemoryFunction; 108 static AdjustAmountOfExternalAllocatedMemoryFunction s_adjustAmountOfExterna lAllocatedMemoryFunction;
105 }; 109 };
106 110
107 } // namespace WTF 111 } // namespace WTF
108 112
109 #endif // ArrayBufferContents_h 113 #endif // ArrayBufferContents_h
OLDNEW
« no previous file with comments | « Source/wtf/ArrayBuffer.h ('k') | Source/wtf/ArrayBufferContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698