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

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

Issue 1097773004: Sharing of SharedArrayBuffer via PostMessage transfer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update for non-split typedarray hierarchy Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 unsigned byteOffset() const 67 unsigned byteOffset() const
68 { 68 {
69 return m_byteOffset; 69 return m_byteOffset;
70 } 70 }
71 71
72 virtual unsigned byteLength() const = 0; 72 virtual unsigned byteLength() const = 0;
73 73
74 void setNeuterable(bool flag) { m_isNeuterable = flag; } 74 void setNeuterable(bool flag) { m_isNeuterable = flag; }
75 bool isNeuterable() const { return m_isNeuterable; } 75 bool isNeuterable() const { return m_isNeuterable; }
76 bool isShared() const { return m_buffer ? m_buffer->isShared() : false; }
76 77
77 virtual ~ArrayBufferView(); 78 virtual ~ArrayBufferView();
78 79
79 protected: 80 protected:
80 ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset); 81 ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset);
81 82
82 inline bool setImpl(ArrayBufferView*, unsigned byteOffset); 83 inline bool setImpl(ArrayBufferView*, unsigned byteOffset);
83 84
84 inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned b yteOffset); 85 inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned b yteOffset);
85 86
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 end = start; 202 end = start;
202 *offset = static_cast<unsigned>(start); 203 *offset = static_cast<unsigned>(start);
203 *length = static_cast<unsigned>(end - start); 204 *length = static_cast<unsigned>(end - start);
204 } 205 }
205 206
206 } // namespace WTF 207 } // namespace WTF
207 208
208 using WTF::ArrayBufferView; 209 using WTF::ArrayBufferView;
209 210
210 #endif // ArrayBufferView_h 211 #endif // ArrayBufferView_h
OLDNEW
« Source/wtf/ArrayBufferContents.cpp ('K') | « Source/wtf/ArrayBufferContents.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698