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

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

Issue 15877002: move constructors to new style callbacks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years, 7 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 | « Source/bindings/v8/custom/V8DOMPointCustom.cpp ('k') | Source/bindings/v8/custom/V8FormDataCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8DataViewCustom.cpp
diff --git a/Source/bindings/v8/custom/V8DataViewCustom.cpp b/Source/bindings/v8/custom/V8DataViewCustom.cpp
index 43f8560a60c770b1c098ffb96e3d839e76a41942..6317e10f1aa94d83650be77e8a678225f010ea3b 100644
--- a/Source/bindings/v8/custom/V8DataViewCustom.cpp
+++ b/Source/bindings/v8/custom/V8DataViewCustom.cpp
@@ -32,7 +32,7 @@
namespace WebCore {
-v8::Handle<v8::Value> V8DataView::constructorCustom(const v8::Arguments& args)
+void V8DataView::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
{
if (!args.Length()) {
// see constructWebGLArray -- we don't seem to be able to distingish between
@@ -40,11 +40,14 @@ v8::Handle<v8::Value> V8DataView::constructorCustom(const v8::Arguments& args)
RefPtr<DataView> dataView = DataView::create(0);
v8::Handle<v8::Object> wrapper = args.Holder();
V8DOMWrapper::associateObjectWithWrapper(dataView.release(), &info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependent);
- return wrapper;
+ args.GetReturnValue().Set(wrapper);
+ return;
}
- if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())))
- return throwTypeError(0, args.GetIsolate());
- return constructWebGLArrayWithArrayBufferArgument<DataView, char>(args, &info, v8::kExternalByteArray, false);
+ if (args[0]->IsNull() || !V8ArrayBuffer::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))) {
+ throwTypeError(0, args.GetIsolate());
+ return;
+ }
+ constructWebGLArrayWithArrayBufferArgument<DataView, char>(args, &info, v8::kExternalByteArray, false);
}
// FIXME: Don't need this override.
« no previous file with comments | « Source/bindings/v8/custom/V8DOMPointCustom.cpp ('k') | Source/bindings/v8/custom/V8FormDataCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698