| Index: Source/core/dom/DOMSharedArrayBuffer.cpp
|
| diff --git a/Source/core/dom/DOMArrayBuffer.cpp b/Source/core/dom/DOMSharedArrayBuffer.cpp
|
| similarity index 60%
|
| copy from Source/core/dom/DOMArrayBuffer.cpp
|
| copy to Source/core/dom/DOMSharedArrayBuffer.cpp
|
| index c0ee1e5143bad2f4ce4317604979f0cc9019e613..4655184c9a3fb99d10a49aba0f43edb2f340ef66 100644
|
| --- a/Source/core/dom/DOMArrayBuffer.cpp
|
| +++ b/Source/core/dom/DOMSharedArrayBuffer.cpp
|
| @@ -1,27 +1,27 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| #include "config.h"
|
| -#include "core/dom/DOMArrayBuffer.h"
|
| +#include "core/dom/DOMSharedArrayBuffer.h"
|
|
|
| #include "bindings/core/v8/DOMDataStore.h"
|
| #include "bindings/core/v8/V8DOMWrapper.h"
|
|
|
| namespace blink {
|
|
|
| -v8::Local<v8::Object> DOMArrayBuffer::wrap(v8::Isolate* isolate, v8::Local<v8::Object> creationContext)
|
| +v8::Local<v8::Object> DOMSharedArrayBuffer::wrap(v8::Isolate* isolate, v8::Local<v8::Object> creationContext)
|
| {
|
| // It's possible that no one except for the new wrapper owns this object at
|
| // this moment, so we have to prevent GC to collect this object until the
|
| // object gets associated with the wrapper.
|
| - RefPtr<DOMArrayBuffer> protect(this);
|
| + RefPtr<DOMSharedArrayBuffer> protect(this);
|
|
|
| ASSERT(!DOMDataStore::containsWrapper(this, isolate));
|
|
|
| const WrapperTypeInfo* wrapperTypeInfo = this->wrapperTypeInfo();
|
| - v8::Local<v8::Object> wrapper = v8::ArrayBuffer::New(isolate, data(), byteLength());
|
| - // V8::ArrayBuffer::New may run an arbitrary script and it may result in
|
| + v8::Local<v8::Object> wrapper = v8::SharedArrayBuffer::New(isolate, data(), byteLength());
|
| + // V8::SharedArrayBuffer::New may run an arbitrary script and it may result in
|
| // creating a new wrapper and associating it with |this|. If so, the
|
| // wrapper already created and associated must be used.
|
| v8::Local<v8::Object> associatedWrapper = DOMDataStore::getWrapper(this, isolate);
|
| @@ -31,11 +31,8 @@ v8::Local<v8::Object> DOMArrayBuffer::wrap(v8::Isolate* isolate, v8::Local<v8::O
|
| return associateWithWrapper(isolate, wrapperTypeInfo, wrapper);
|
| }
|
|
|
| -v8::Local<v8::Object> DOMArrayBuffer::associateWithWrapper(v8::Isolate* isolate, const WrapperTypeInfo* wrapperTypeInfo, v8::Local<v8::Object> wrapper)
|
| +v8::Local<v8::Object> DOMSharedArrayBuffer::associateWithWrapper(v8::Isolate* isolate, const WrapperTypeInfo* wrapperTypeInfo, v8::Local<v8::Object> wrapper)
|
| {
|
| - // This function does not set a deallocation observer to the underlying
|
| - // array buffer. It's a caller's duty.
|
| -
|
| return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTypeInfo, wrapper);
|
| }
|
|
|
|
|