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

Side by Side Diff: test/cctest/test-api.cc

Issue 18402007: HasRealIndexedProperty doesn't work on JSGlobalProxy (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@master
Patch Set: Remove comment Created 7 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 LocalContext env(NULL, global_template); 2333 LocalContext env(NULL, global_template);
2334 v8::Handle<v8::Object> global_proxy = env->Global(); 2334 v8::Handle<v8::Object> global_proxy = env->Global();
2335 v8::Handle<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>(); 2335 v8::Handle<v8::Object> global = global_proxy->GetPrototype().As<v8::Object>();
2336 CHECK_EQ(1, global->InternalFieldCount()); 2336 CHECK_EQ(1, global->InternalFieldCount());
2337 CHECK(global->GetInternalField(0)->IsUndefined()); 2337 CHECK(global->GetInternalField(0)->IsUndefined());
2338 global->SetInternalField(0, v8_num(17)); 2338 global->SetInternalField(0, v8_num(17));
2339 CHECK_EQ(17, global->GetInternalField(0)->Int32Value()); 2339 CHECK_EQ(17, global->GetInternalField(0)->Int32Value());
2340 } 2340 }
2341 2341
2342 2342
2343 THREADED_TEST(GlobalObjectHasRealIndexedProperty) {
2344 LocalContext env;
2345 v8::HandleScope scope(v8::Isolate::GetCurrent());
2346
2347 v8::Local<v8::Object> global = env->Global();
2348 global->Set(0, v8::String::New("value"));
2349 CHECK(global->HasRealIndexedProperty(0));
2350 }
2351
2352
2343 static void CheckAlignedPointerInInternalField(Handle<v8::Object> obj, 2353 static void CheckAlignedPointerInInternalField(Handle<v8::Object> obj,
2344 void* value) { 2354 void* value) {
2345 CHECK_EQ(0, static_cast<int>(reinterpret_cast<uintptr_t>(value) & 0x1)); 2355 CHECK_EQ(0, static_cast<int>(reinterpret_cast<uintptr_t>(value) & 0x1));
2346 obj->SetAlignedPointerInInternalField(0, value); 2356 obj->SetAlignedPointerInInternalField(0, value);
2347 HEAP->CollectAllGarbage(i::Heap::kNoGCFlags); 2357 HEAP->CollectAllGarbage(i::Heap::kNoGCFlags);
2348 CHECK_EQ(value, obj->GetAlignedPointerFromInternalField(0)); 2358 CHECK_EQ(value, obj->GetAlignedPointerFromInternalField(0));
2349 } 2359 }
2350 2360
2351 2361
2352 THREADED_TEST(InternalFieldsAlignedPointers) { 2362 THREADED_TEST(InternalFieldsAlignedPointers) {
(...skipping 17346 matching lines...) Expand 10 before | Expand all | Expand 10 after
19699 i::Semaphore* sem_; 19709 i::Semaphore* sem_;
19700 volatile int sem_value_; 19710 volatile int sem_value_;
19701 }; 19711 };
19702 19712
19703 19713
19704 THREADED_TEST(SemaphoreInterruption) { 19714 THREADED_TEST(SemaphoreInterruption) {
19705 ThreadInterruptTest().RunTest(); 19715 ThreadInterruptTest().RunTest();
19706 } 19716 }
19707 19717
19708 #endif // WIN32 19718 #endif // WIN32
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698