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

Unified Diff: Source/bindings/tests/results/V8Float64Array.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
Index: Source/bindings/tests/results/V8Float64Array.cpp
diff --git a/Source/bindings/tests/results/V8Float64Array.cpp b/Source/bindings/tests/results/V8Float64Array.cpp
index 6ca096fb459050d3f4de784a6033c9ab396b1aaf..eb19908c774ff54b310460d0a9da1225261fffe9 100644
--- a/Source/bindings/tests/results/V8Float64Array.cpp
+++ b/Source/bindings/tests/results/V8Float64Array.cpp
@@ -89,7 +89,7 @@ static v8::Handle<v8::Value> setMethodCallback(const v8::Arguments& args)
return Float64ArrayV8Internal::setMethod(args);
}
-static v8::Handle<v8::Value> constructor(const v8::Arguments& args)
+static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args)
{
return constructWebGLArray<Float64Array, V8Float64Array, double>(args, &V8Float64Array::info, v8::kExternalDoubleArray);
}
@@ -109,15 +109,19 @@ static const V8DOMConfiguration::BatchedMethod V8Float64ArrayMethods[] = {
{"set", Float64ArrayV8Internal::setMethodCallback, 0, 0},
};
-v8::Handle<v8::Value> V8Float64Array::constructorCallback(const v8::Arguments& args)
+void V8Float64Array::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
{
- if (!args.IsConstructCall())
- return throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
+ if (!args.IsConstructCall()) {
+ throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
+ return;
+ }
- if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
- return args.Holder();
+ if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
+ args.GetReturnValue().Set(args.Holder());
+ return;
+ }
- return Float64ArrayV8Internal::constructor(args);
+ Float64ArrayV8Internal::constructor(args);
}
static v8::Persistent<v8::FunctionTemplate> ConfigureV8Float64ArrayTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
« no previous file with comments | « Source/bindings/tests/results/V8Float64Array.h ('k') | Source/bindings/tests/results/V8TestEventConstructor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698