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

Side by Side Diff: test/cctest/heap/test-alloc.cc

Issue 2449783006: Add a native data property that replaces itself with a real data property (Closed)
Patch Set: Created 4 years, 1 month 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
« src/accessors.cc ('K') | « src/objects-inl.h ('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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void TestSetter(v8::Local<v8::Name> name, v8::Local<v8::Value> value, 119 void TestSetter(v8::Local<v8::Name> name, v8::Local<v8::Value> value,
120 const v8::PropertyCallbackInfo<v8::Boolean>& info) { 120 const v8::PropertyCallbackInfo<v8::Boolean>& info) {
121 UNREACHABLE(); 121 UNREACHABLE();
122 } 122 }
123 123
124 124
125 Handle<AccessorInfo> TestAccessorInfo( 125 Handle<AccessorInfo> TestAccessorInfo(
126 Isolate* isolate, PropertyAttributes attributes) { 126 Isolate* isolate, PropertyAttributes attributes) {
127 Handle<String> name = isolate->factory()->NewStringFromStaticChars("get"); 127 Handle<String> name = isolate->factory()->NewStringFromStaticChars("get");
128 return Accessors::MakeAccessor(isolate, name, &TestGetter, &TestSetter, 128 return Accessors::MakeAccessor(isolate, name, &TestGetter, &TestSetter,
129 attributes); 129 attributes, false);
130 } 130 }
131 131
132 132
133 TEST(StressJS) { 133 TEST(StressJS) {
134 Isolate* isolate = CcTest::i_isolate(); 134 Isolate* isolate = CcTest::i_isolate();
135 Factory* factory = isolate->factory(); 135 Factory* factory = isolate->factory();
136 v8::HandleScope scope(CcTest::isolate()); 136 v8::HandleScope scope(CcTest::isolate());
137 v8::Local<v8::Context> env = v8::Context::New(CcTest::isolate()); 137 v8::Local<v8::Context> env = v8::Context::New(CcTest::isolate());
138 env->Enter(); 138 env->Enter();
139 Handle<JSFunction> function = factory->NewFunction( 139 Handle<JSFunction> function = factory->NewFunction(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 code_range.FreeRawMemory(blocks[index].base, blocks[index].size); 239 code_range.FreeRawMemory(blocks[index].base, blocks[index].size);
240 current_allocated -= blocks[index].size; 240 current_allocated -= blocks[index].size;
241 if (index < blocks.length() - 1) { 241 if (index < blocks.length() - 1) {
242 blocks[index] = blocks.RemoveLast(); 242 blocks[index] = blocks.RemoveLast();
243 } else { 243 } else {
244 blocks.RemoveLast(); 244 blocks.RemoveLast();
245 } 245 }
246 } 246 }
247 } 247 }
248 } 248 }
OLDNEW
« src/accessors.cc ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698