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

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

Issue 1423723002: Map v8::Function to JSReceiver + IsCallable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 2 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 | « test/cctest/test-alloc.cc ('k') | test/cctest/test-compiler.cc » ('j') | 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 8ad8a7777050e0599fbd68b6d3d419f4b20c2799..727025755abb0547a786fb7da87037a4baf05c68 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -9802,7 +9802,7 @@ THREADED_TEST(ConstructorForObject) {
CHECK(!try_catch.HasCaught());
CHECK(instance2->IsObject());
- CHECK(!instance2->IsFunction());
+ CHECK(instance2->IsFunction());
value = CompileRun("new obj5(28)");
CHECK(!try_catch.HasCaught());
@@ -19631,11 +19631,12 @@ THREADED_TEST(FunctionNew) {
CHECK(v8::Integer::New(isolate, 17)->Equals(result));
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
// Verify function not cached
- auto serial_number = handle(i::Smi::cast(v8::Utils::OpenHandle(*func)
- ->shared()
- ->get_api_func_data()
- ->serial_number()),
- i_isolate);
+ auto serial_number = handle(
+ i::Smi::cast(i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*func))
+ ->shared()
+ ->get_api_func_data()
+ ->serial_number()),
+ i_isolate);
auto cache = i_isolate->function_cache();
CHECK(cache->Lookup(serial_number)->IsTheHole());
// Verify that each Function::New creates a new function instance
@@ -21939,7 +21940,7 @@ TEST(ObjectTemplateIntrinsics) {
ExpectString("typeof obj1.values", "function");
auto values = Local<Function>::Cast(object->Get(v8_str("values")));
- auto fn = v8::Utils::OpenHandle(*values);
+ auto fn = i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*values));
auto ctx = v8::Utils::OpenHandle(*env.local());
CHECK_EQ(fn->GetCreationContext(), *ctx);
@@ -21951,7 +21952,7 @@ TEST(ObjectTemplateIntrinsics) {
CHECK_NE(*object->Get(v8_str("values")), *object2->Get(v8_str("values")));
auto values2 = Local<Function>::Cast(object2->Get(v8_str("values")));
- auto fn2 = v8::Utils::OpenHandle(*values2);
+ auto fn2 = i::Handle<i::JSFunction>::cast(v8::Utils::OpenHandle(*values2));
auto ctx2 = v8::Utils::OpenHandle(*env2.local());
CHECK_EQ(fn2->GetCreationContext(), *ctx2);
}
« no previous file with comments | « test/cctest/test-alloc.cc ('k') | test/cctest/test-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698