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

Side by Side Diff: third_party/WebKit/Source/web/WebArrayBufferView.cpp

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 * 7 *
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 WebArrayBufferView* WebArrayBufferView::createFromV8Value(v8::Local<v8::Value> v alue) 60 WebArrayBufferView* WebArrayBufferView::createFromV8Value(v8::Local<v8::Value> v alue)
61 { 61 {
62 if (!value->IsArrayBufferView()) 62 if (!value->IsArrayBufferView())
63 return 0; 63 return 0;
64 DOMArrayBufferView* view = V8ArrayBufferView::toImpl(value.As<v8::Object>()) ; 64 DOMArrayBufferView* view = V8ArrayBufferView::toImpl(value.As<v8::Object>()) ;
65 return new WebArrayBufferView(view); 65 return new WebArrayBufferView(view);
66 } 66 }
67 67
68 WebArrayBufferView::WebArrayBufferView(const PassRefPtr<DOMArrayBufferView>& val ue) 68 WebArrayBufferView::WebArrayBufferView(DOMArrayBufferView* value)
69 : m_private(value) 69 : m_private(value)
70 { 70 {
71 } 71 }
72 72
73 WebArrayBufferView& WebArrayBufferView::operator=(const PassRefPtr<DOMArrayBuffe rView>& value) 73 WebArrayBufferView& WebArrayBufferView::operator=(DOMArrayBufferView* value)
74 { 74 {
75 m_private = value; 75 m_private = value;
76 return *this; 76 return *this;
77 } 77 }
78 78
79 WebArrayBufferView::operator PassRefPtr<DOMArrayBufferView>() const 79 WebArrayBufferView::operator DOMArrayBufferView*() const
80 { 80 {
81 return m_private.get(); 81 return m_private.get();
82 } 82 }
83 83
84 } // namespace blink 84 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698