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

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

Issue 895053002: Move the contents of api-natives.js to c++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/runtime/runtime-i18n.cc ('k') | tools/gyp/v8.gyp » ('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 dd5358c6c35f67b386807ee5e314c7038c0d3ab3..9d3954767e9e990f736b3dd2ddfa903959cdb190 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -23325,10 +23325,10 @@ THREADED_TEST(FunctionNew) {
i::Smi::cast(v8::Utils::OpenHandle(*func)
->shared()->get_api_func_data()->serial_number())->value();
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
- i::Handle<i::JSObject> cache(i_isolate->native_context()->function_cache());
- i::Handle<i::Object> elm =
- i::Object::GetElement(i_isolate, cache, serial_number).ToHandleChecked();
- CHECK(elm->IsUndefined());
+ i::Handle<i::FixedArray> cache(i_isolate->native_context()->function_cache());
+ if (serial_number < cache->length()) {
+ CHECK(cache->get(serial_number)->IsUndefined());
+ }
// Verify that each Function::New creates a new function instance
Local<Object> data2 = v8::Object::New(isolate);
function_new_expected_env = data2;
« no previous file with comments | « src/runtime/runtime-i18n.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698