Chromium Code Reviews| Index: Source/core/dom/DOMDataView.cpp |
| diff --git a/Source/core/dom/DOMDataView.cpp b/Source/core/dom/DOMDataView.cpp |
| index 60d96f4cae5c5645d9190b36a6887aa03db9bd55..d19e2998157ca6db7811d6cf0db73e57618cd3a1 100644 |
| --- a/Source/core/dom/DOMDataView.cpp |
| +++ b/Source/core/dom/DOMDataView.cpp |
| @@ -29,6 +29,8 @@ v8::Handle<v8::Object> DOMDataView::wrap(v8::Handle<v8::Object> creationContext, |
| const WrapperTypeInfo* wrapperTypeInfo = this->wrapperTypeInfo(); |
| v8::Local<v8::Value> v8Buffer = toV8(buffer(), creationContext, isolate); |
| + if (v8Buffer.IsEmpty()) |
| + return v8::Handle<v8::Object>(); |
|
haraken
2015/04/28 04:24:59
Remove.
Yuki
2015/04/28 04:47:57
I think it's good to check that v8Buffer is not v8
|
| ASSERT(v8Buffer->IsArrayBuffer()); |
| v8::Handle<v8::Object> wrapper = v8::DataView::New(v8Buffer.As<v8::ArrayBuffer>(), byteOffset(), byteLength()); |