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

Side by Side Diff: test/cctest/test-declarative-accessors.cc

Issue 24265002: bulk replace v8::Isolate::GetCurrent in tests (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « test/cctest/test-debug.cc ('k') | test/cctest/test-hashing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 uint64_t data_[kArraySize]; 71 uint64_t data_[kArraySize];
72 DISALLOW_COPY_AND_ASSIGN(AlignedArray); 72 DISALLOW_COPY_AND_ASSIGN(AlignedArray);
73 }; 73 };
74 74
75 75
76 class DescriptorTestHelper { 76 class DescriptorTestHelper {
77 public: 77 public:
78 DescriptorTestHelper() : 78 DescriptorTestHelper() :
79 isolate_(NULL), array_(new AlignedArray), handle_array_(new HandleArray) { 79 isolate_(NULL), array_(new AlignedArray), handle_array_(new HandleArray) {
80 v8::V8::Initialize(); 80 v8::V8::Initialize();
81 isolate_ = v8::Isolate::GetCurrent(); 81 isolate_ = CcTest::isolate();
82 } 82 }
83 v8::Isolate* isolate_; 83 v8::Isolate* isolate_;
84 // Data objects. 84 // Data objects.
85 SmartPointer<AlignedArray> array_; 85 SmartPointer<AlignedArray> array_;
86 SmartPointer<HandleArray> handle_array_; 86 SmartPointer<HandleArray> handle_array_;
87 private: 87 private:
88 DISALLOW_COPY_AND_ASSIGN(DescriptorTestHelper); 88 DISALLOW_COPY_AND_ASSIGN(DescriptorTestHelper);
89 }; 89 };
90 90
91 91
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 int internal_field = 0; 291 int internal_field = 0;
292 v8::Handle<v8::DeclaredAccessorDescriptor> descriptor = 292 v8::Handle<v8::DeclaredAccessorDescriptor> descriptor =
293 OOD::NewInternalFieldDereference(helper.isolate_, internal_field) 293 OOD::NewInternalFieldDereference(helper.isolate_, internal_field)
294 ->NewRawShift(helper.isolate_, index*kPointerSize) 294 ->NewRawShift(helper.isolate_, index*kPointerSize)
295 ->NewHandleDereference(helper.isolate_); 295 ->NewHandleDereference(helper.isolate_);
296 HandleArray* array = *helper.handle_array_; 296 HandleArray* array = *helper.handle_array_;
297 v8::Handle<v8::String> expected = v8_str("whatever"); 297 v8::Handle<v8::String> expected = v8_str("whatever");
298 array->handles_[index].Reset(helper.isolate_, expected); 298 array->handles_[index].Reset(helper.isolate_, expected);
299 VerifyRead(descriptor, internal_field, array, expected); 299 VerifyRead(descriptor, internal_field, array, expected);
300 } 300 }
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/cctest/test-hashing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698