| OLD | NEW |
| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 function->set_initial_map(initial_map); | 194 function->set_initial_map(initial_map); |
| 195 JSReceiver::SetProperty( | 195 JSReceiver::SetProperty( |
| 196 global, handle(func_name), handle(function), NONE, kNonStrictMode); | 196 global, handle(func_name), handle(function), NONE, kNonStrictMode); |
| 197 | 197 |
| 198 JSObject* obj = JSObject::cast( | 198 JSObject* obj = JSObject::cast( |
| 199 heap->AllocateJSObject(function)->ToObjectChecked()); | 199 heap->AllocateJSObject(function)->ToObjectChecked()); |
| 200 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 4"); | 200 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 4"); |
| 201 | 201 |
| 202 func_name = String::cast( | 202 func_name = String::cast( |
| 203 heap->InternalizeUtf8String("theFunction")->ToObjectChecked()); | 203 heap->InternalizeUtf8String("theFunction")->ToObjectChecked()); |
| 204 CHECK(isolate->context()->global_object()->HasLocalProperty(func_name)); | 204 CHECK(JSReceiver::HasLocalProperty(global, handle(func_name))); |
| 205 Object* func_value = isolate->context()->global_object()-> | 205 Object* func_value = isolate->context()->global_object()-> |
| 206 GetProperty(func_name)->ToObjectChecked(); | 206 GetProperty(func_name)->ToObjectChecked(); |
| 207 CHECK(func_value->IsJSFunction()); | 207 CHECK(func_value->IsJSFunction()); |
| 208 function = JSFunction::cast(func_value); | 208 function = JSFunction::cast(func_value); |
| 209 | 209 |
| 210 obj = JSObject::cast(heap->AllocateJSObject(function)->ToObjectChecked()); | 210 obj = JSObject::cast(heap->AllocateJSObject(function)->ToObjectChecked()); |
| 211 String* obj_name = | 211 String* obj_name = |
| 212 String::cast(heap->InternalizeUtf8String("theObject")->ToObjectChecked()); | 212 String::cast(heap->InternalizeUtf8String("theObject")->ToObjectChecked()); |
| 213 JSReceiver::SetProperty( | 213 JSReceiver::SetProperty( |
| 214 global, handle(obj_name), handle(obj), NONE, kNonStrictMode); | 214 global, handle(obj_name), handle(obj), NONE, kNonStrictMode); |
| 215 String* prop_name = | 215 String* prop_name = |
| 216 String::cast(heap->InternalizeUtf8String("theSlot")->ToObjectChecked()); | 216 String::cast(heap->InternalizeUtf8String("theSlot")->ToObjectChecked()); |
| 217 Handle<Smi> twenty_three(Smi::FromInt(23), isolate); | 217 Handle<Smi> twenty_three(Smi::FromInt(23), isolate); |
| 218 JSReceiver::SetProperty( | 218 JSReceiver::SetProperty( |
| 219 handle(obj), handle(prop_name), twenty_three, NONE, kNonStrictMode); | 219 handle(obj), handle(prop_name), twenty_three, NONE, kNonStrictMode); |
| 220 | 220 |
| 221 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 5"); | 221 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 5"); |
| 222 | 222 |
| 223 obj_name = | 223 obj_name = |
| 224 String::cast(heap->InternalizeUtf8String("theObject")->ToObjectChecked()); | 224 String::cast(heap->InternalizeUtf8String("theObject")->ToObjectChecked()); |
| 225 CHECK(isolate->context()->global_object()->HasLocalProperty(obj_name)); | 225 CHECK(JSReceiver::HasLocalProperty(global, handle(obj_name))); |
| 226 CHECK(isolate->context()->global_object()-> | 226 CHECK(isolate->context()->global_object()-> |
| 227 GetProperty(obj_name)->ToObjectChecked()->IsJSObject()); | 227 GetProperty(obj_name)->ToObjectChecked()->IsJSObject()); |
| 228 obj = JSObject::cast(isolate->context()->global_object()-> | 228 obj = JSObject::cast(isolate->context()->global_object()-> |
| 229 GetProperty(obj_name)->ToObjectChecked()); | 229 GetProperty(obj_name)->ToObjectChecked()); |
| 230 prop_name = | 230 prop_name = |
| 231 String::cast(heap->InternalizeUtf8String("theSlot")->ToObjectChecked()); | 231 String::cast(heap->InternalizeUtf8String("theSlot")->ToObjectChecked()); |
| 232 CHECK(obj->GetProperty(prop_name) == Smi::FromInt(23)); | 232 CHECK(obj->GetProperty(prop_name) == Smi::FromInt(23)); |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 582 |
| 583 | 583 |
| 584 TEST(RegressJoinThreadsOnIsolateDeinit) { | 584 TEST(RegressJoinThreadsOnIsolateDeinit) { |
| 585 intptr_t size_limit = ShortLivingIsolate() * 2; | 585 intptr_t size_limit = ShortLivingIsolate() * 2; |
| 586 for (int i = 0; i < 10; i++) { | 586 for (int i = 0; i < 10; i++) { |
| 587 CHECK_GT(size_limit, ShortLivingIsolate()); | 587 CHECK_GT(size_limit, ShortLivingIsolate()); |
| 588 } | 588 } |
| 589 } | 589 } |
| 590 | 590 |
| 591 #endif // __linux__ and !USE_SIMULATOR | 591 #endif // __linux__ and !USE_SIMULATOR |
| OLD | NEW |