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

Unified Diff: Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp

Issue 6596048: Merge 78738 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/canvas/webgl/data-view-test-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp
===================================================================
--- Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp (revision 79898)
+++ Source/WebCore/bindings/v8/custom/V8DataViewCustom.cpp (working copy)
@@ -39,8 +39,11 @@
v8::Handle<v8::Value> V8DataView::constructorCallback(const v8::Arguments& args)
{
- INC_STATS("DOM.ArrayBuffer.Constructor");
+ INC_STATS("DOM.DataView.Constructor");
+ if (!args.IsConstructCall())
+ return throwError("DOM object constructor cannot be called as a function", V8Proxy::SyntaxError);
+
if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0]))
return V8Proxy::throwTypeError();
return constructWebGLArrayWithArrayBufferArgument<DataView, char>(args, &info, v8::kExternalByteArray, false);
« no previous file with comments | « LayoutTests/fast/canvas/webgl/data-view-test-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698