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

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

Issue 16337005: Deprecate FACTORY helper macro. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/x64/full-codegen-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-alloc.cc
diff --git a/test/cctest/test-alloc.cc b/test/cctest/test-alloc.cc
index bc469aa5201f9e08d2163f1e3c03967180bb63d8..d316c8e49febdd5645322a36c4d9b8795ae544a7 100644
--- a/test/cctest/test-alloc.cc
+++ b/test/cctest/test-alloc.cc
@@ -117,25 +117,27 @@ const AccessorDescriptor kDescriptor = {
TEST(StressJS) {
+ Isolate* isolate = Isolate::Current();
+ Factory* factory = isolate->factory();
v8::HandleScope scope(v8::Isolate::GetCurrent());
v8::Handle<v8::Context> env = v8::Context::New(v8::Isolate::GetCurrent());
env->Enter();
Handle<JSFunction> function =
- FACTORY->NewFunction(FACTORY->function_string(), FACTORY->null_value());
+ factory->NewFunction(factory->function_string(), factory->null_value());
// Force the creation of an initial map and set the code to
// something empty.
- FACTORY->NewJSObject(function);
+ factory->NewJSObject(function);
function->ReplaceCode(Isolate::Current()->builtins()->builtin(
Builtins::kEmptyFunction));
// Patch the map to have an accessor for "get".
Handle<Map> map(function->initial_map());
Handle<DescriptorArray> instance_descriptors(map->instance_descriptors());
- Handle<Foreign> foreign = FACTORY->NewForeign(&kDescriptor);
+ Handle<Foreign> foreign = factory->NewForeign(&kDescriptor);
Handle<String> name =
- FACTORY->NewStringFromAscii(Vector<const char>("get", 3));
+ factory->NewStringFromAscii(Vector<const char>("get", 3));
ASSERT(instance_descriptors->IsEmpty());
- Handle<DescriptorArray> new_descriptors = FACTORY->NewDescriptorArray(0, 1);
+ Handle<DescriptorArray> new_descriptors = factory->NewDescriptorArray(0, 1);
v8::internal::DescriptorArray::WhitenessWitness witness(*new_descriptors);
map->set_instance_descriptors(*new_descriptors);
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698