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

Unified Diff: test/cctest/test-api.cc

Issue 16102002: Add template parameter to ReturnValue::Set. (Closed) Base URL: git://github.com/v8/v8.git@master
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 | « include/v8.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 9097039b4c5762dde28bab7106996cb2fca38b2c..9ded31ebc0634fde0bc705955df38d7c96614ac9 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -1074,6 +1074,12 @@ void FastReturnValueCallback<void>(
}
}
+template<>
+void FastReturnValueCallback<Object>(
+ const v8::FunctionCallbackInfo<v8::Value>& info) {
+ info.GetReturnValue().Set(Object::New());
+}
+
template<typename T>
Handle<Value> TestFastReturnValues() {
LocalContext env;
@@ -1118,6 +1124,8 @@ THREADED_TEST(FastReturnValues) {
CHECK(value->IsUndefined());
}
}
+ value = TestFastReturnValues<Object>();
+ CHECK(value->IsObject());
}
« no previous file with comments | « include/v8.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698