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

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

Issue 16360005: Remove V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/api.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 17519 matching lines...) Expand 10 before | Expand all | Expand 10 after
17530 "})()", 17530 "})()",
17531 "ReferenceError: cell is not defined"); 17531 "ReferenceError: cell is not defined");
17532 } 17532 }
17533 17533
17534 17534
17535 class Visitor42 : public v8::PersistentHandleVisitor { 17535 class Visitor42 : public v8::PersistentHandleVisitor {
17536 public: 17536 public:
17537 explicit Visitor42(v8::Persistent<v8::Object>* object) 17537 explicit Visitor42(v8::Persistent<v8::Object>* object)
17538 : counter_(0), object_(object) { } 17538 : counter_(0), object_(object) { }
17539 17539
17540 #ifdef V8_USE_OLD_STYLE_PERSISTENT_HANDLE_VISITORS
17541 virtual void VisitPersistentHandle(Persistent<Value> value,
17542 uint16_t class_id) {
17543 VisitPersistentHandle(&value, class_id);
17544 }
17545 #endif
17546
17547 virtual void VisitPersistentHandle(Persistent<Value>* value, 17540 virtual void VisitPersistentHandle(Persistent<Value>* value,
17548 uint16_t class_id) { 17541 uint16_t class_id) {
17549 if (class_id != 42) return; 17542 if (class_id != 42) return;
17550 CHECK_EQ(42, value->WrapperClassId()); 17543 CHECK_EQ(42, value->WrapperClassId());
17551 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 17544 v8::Isolate* isolate = v8::Isolate::GetCurrent();
17552 v8::HandleScope handle_scope(isolate); 17545 v8::HandleScope handle_scope(isolate);
17553 v8::Handle<v8::Value> handle = v8::Local<v8::Value>::New(isolate, *value); 17546 v8::Handle<v8::Value> handle = v8::Local<v8::Value>::New(isolate, *value);
17554 v8::Handle<v8::Value> object = 17547 v8::Handle<v8::Value> object =
17555 v8::Local<v8::Object>::New(isolate, *object_); 17548 v8::Local<v8::Object>::New(isolate, *object_);
17556 CHECK(handle->IsObject()); 17549 CHECK(handle->IsObject());
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
19101 i::Semaphore* sem_; 19094 i::Semaphore* sem_;
19102 volatile int sem_value_; 19095 volatile int sem_value_;
19103 }; 19096 };
19104 19097
19105 19098
19106 THREADED_TEST(SemaphoreInterruption) { 19099 THREADED_TEST(SemaphoreInterruption) {
19107 ThreadInterruptTest().RunTest(); 19100 ThreadInterruptTest().RunTest();
19108 } 19101 }
19109 19102
19110 #endif // WIN32 19103 #endif // WIN32
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698