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

Side by Side Diff: Source/wtf/ArrayBuffer.cpp

Issue 18316003: Revert "Use V8 implementation of ArrayBuffer in Blink." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/wtf/ArrayBuffer.h ('k') | Source/wtf/ArrayBufferContents.h » ('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 * 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 m_contents.transfer(result); 46 m_contents.transfer(result);
47 47
48 while (m_firstView) { 48 while (m_firstView) {
49 ArrayBufferView* current = m_firstView; 49 ArrayBufferView* current = m_firstView;
50 removeView(current); 50 removeView(current);
51 current->neuter(); 51 current->neuter();
52 neuteredViews.append(current); 52 neuteredViews.append(current);
53 } 53 }
54
55 m_isNeutered = true;
56
57 return true; 54 return true;
58 } 55 }
59 56
60 void ArrayBuffer::addView(ArrayBufferView* view) 57 void ArrayBuffer::addView(ArrayBufferView* view)
61 { 58 {
62 view->m_buffer = this; 59 view->m_buffer = this;
63 view->m_prevView = 0; 60 view->m_prevView = 0;
64 view->m_nextView = m_firstView; 61 view->m_nextView = m_firstView;
65 if (m_firstView) 62 if (m_firstView)
66 m_firstView->m_prevView = view; 63 m_firstView->m_prevView = view;
67 m_firstView = view; 64 m_firstView = view;
68 } 65 }
69 66
70 void ArrayBuffer::removeView(ArrayBufferView* view) 67 void ArrayBuffer::removeView(ArrayBufferView* view)
71 { 68 {
72 ASSERT(this == view->m_buffer); 69 ASSERT(this == view->m_buffer);
73 if (view->m_nextView) 70 if (view->m_nextView)
74 view->m_nextView->m_prevView = view->m_prevView; 71 view->m_nextView->m_prevView = view->m_prevView;
75 if (view->m_prevView) 72 if (view->m_prevView)
76 view->m_prevView->m_nextView = view->m_nextView; 73 view->m_prevView->m_nextView = view->m_nextView;
77 if (m_firstView == view) 74 if (m_firstView == view)
78 m_firstView = view->m_nextView; 75 m_firstView = view->m_nextView;
79 view->m_prevView = view->m_nextView = 0; 76 view->m_prevView = view->m_nextView = 0;
80 } 77 }
81 78
82 } 79 }
OLDNEW
« no previous file with comments | « Source/wtf/ArrayBuffer.h ('k') | Source/wtf/ArrayBufferContents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698