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

Side by Side Diff: test/cctest/test-mark-compact.cc

Issue 291153005: Consistently say 'own' property (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add new files Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/mjsunit/runtime-gen/getlocalelementnames.js » ('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 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Handle<JSFunction> function = factory->NewFunction(func_name); 159 Handle<JSFunction> function = factory->NewFunction(func_name);
160 JSReceiver::SetProperty(global, func_name, function, NONE, SLOPPY).Check(); 160 JSReceiver::SetProperty(global, func_name, function, NONE, SLOPPY).Check();
161 161
162 factory->NewJSObject(function); 162 factory->NewJSObject(function);
163 } 163 }
164 164
165 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 4"); 165 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 4");
166 166
167 { HandleScope scope(isolate); 167 { HandleScope scope(isolate);
168 Handle<String> func_name = factory->InternalizeUtf8String("theFunction"); 168 Handle<String> func_name = factory->InternalizeUtf8String("theFunction");
169 CHECK(JSReceiver::HasLocalProperty(global, func_name)); 169 CHECK(JSReceiver::HasOwnProperty(global, func_name));
170 Handle<Object> func_value = 170 Handle<Object> func_value =
171 Object::GetProperty(global, func_name).ToHandleChecked(); 171 Object::GetProperty(global, func_name).ToHandleChecked();
172 CHECK(func_value->IsJSFunction()); 172 CHECK(func_value->IsJSFunction());
173 Handle<JSFunction> function = Handle<JSFunction>::cast(func_value); 173 Handle<JSFunction> function = Handle<JSFunction>::cast(func_value);
174 Handle<JSObject> obj = factory->NewJSObject(function); 174 Handle<JSObject> obj = factory->NewJSObject(function);
175 175
176 Handle<String> obj_name = factory->InternalizeUtf8String("theObject"); 176 Handle<String> obj_name = factory->InternalizeUtf8String("theObject");
177 JSReceiver::SetProperty(global, obj_name, obj, NONE, SLOPPY).Check(); 177 JSReceiver::SetProperty(global, obj_name, obj, NONE, SLOPPY).Check();
178 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot"); 178 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
179 Handle<Smi> twenty_three(Smi::FromInt(23), isolate); 179 Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
180 JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY).Check(); 180 JSReceiver::SetProperty(obj, prop_name, twenty_three, NONE, SLOPPY).Check();
181 } 181 }
182 182
183 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 5"); 183 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 5");
184 184
185 { HandleScope scope(isolate); 185 { HandleScope scope(isolate);
186 Handle<String> obj_name = factory->InternalizeUtf8String("theObject"); 186 Handle<String> obj_name = factory->InternalizeUtf8String("theObject");
187 CHECK(JSReceiver::HasLocalProperty(global, obj_name)); 187 CHECK(JSReceiver::HasOwnProperty(global, obj_name));
188 Handle<Object> object = 188 Handle<Object> object =
189 Object::GetProperty(global, obj_name).ToHandleChecked(); 189 Object::GetProperty(global, obj_name).ToHandleChecked();
190 CHECK(object->IsJSObject()); 190 CHECK(object->IsJSObject());
191 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot"); 191 Handle<String> prop_name = factory->InternalizeUtf8String("theSlot");
192 CHECK_EQ(*Object::GetProperty(object, prop_name).ToHandleChecked(), 192 CHECK_EQ(*Object::GetProperty(object, prop_name).ToHandleChecked(),
193 Smi::FromInt(23)); 193 Smi::FromInt(23));
194 } 194 }
195 } 195 }
196 196
197 197
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 492
493 TEST(RegressJoinThreadsOnIsolateDeinit) { 493 TEST(RegressJoinThreadsOnIsolateDeinit) {
494 intptr_t size_limit = ShortLivingIsolate() * 2; 494 intptr_t size_limit = ShortLivingIsolate() * 2;
495 for (int i = 0; i < 10; i++) { 495 for (int i = 0; i < 10; i++) {
496 CHECK_GT(size_limit, ShortLivingIsolate()); 496 CHECK_GT(size_limit, ShortLivingIsolate());
497 } 497 }
498 } 498 }
499 499
500 #endif // __linux__ and !USE_SIMULATOR 500 #endif // __linux__ and !USE_SIMULATOR
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/mjsunit/runtime-gen/getlocalelementnames.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698