| Index: Source/core/dom/DOMDataView.cpp
|
| diff --git a/Source/core/dom/DOMDataView.cpp b/Source/core/dom/DOMDataView.cpp
|
| index 4398e8ce97c6a7c40db9de7c0ef8f36e84354e80..995d5fd00192fa1d40ebca680eb129dae918ce76 100644
|
| --- a/Source/core/dom/DOMDataView.cpp
|
| +++ b/Source/core/dom/DOMDataView.cpp
|
| @@ -71,6 +71,12 @@ v8::Local<v8::Object> DOMDataView::wrap(v8::Isolate* isolate, v8::Local<v8::Obje
|
| ASSERT(v8Buffer->IsArrayBuffer());
|
|
|
| v8::Local<v8::Object> wrapper = v8::DataView::New(v8Buffer.As<v8::ArrayBuffer>(), byteOffset(), byteLength());
|
| + // V8::DataView::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);
|
| + if (UNLIKELY(!associatedWrapper.IsEmpty()))
|
| + return associatedWrapper;
|
|
|
| return associateWithWrapper(isolate, wrapperTypeInfo, wrapper);
|
| }
|
|
|