| 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 19253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19264 access_check_fail_thrown = false; | 19264 access_check_fail_thrown = false; |
| 19265 CompileRun("other.x;"); | 19265 CompileRun("other.x;"); |
| 19266 CHECK(access_check_fail_thrown); | 19266 CHECK(access_check_fail_thrown); |
| 19267 CHECK(try_catch.HasCaught()); | 19267 CHECK(try_catch.HasCaught()); |
| 19268 } | 19268 } |
| 19269 | 19269 |
| 19270 CheckCorrectThrow("other.x"); | 19270 CheckCorrectThrow("other.x"); |
| 19271 CheckCorrectThrow("other[1]"); | 19271 CheckCorrectThrow("other[1]"); |
| 19272 CheckCorrectThrow("JSON.stringify(other)"); | 19272 CheckCorrectThrow("JSON.stringify(other)"); |
| 19273 CheckCorrectThrow("has_own_property(other, 'x')"); | 19273 CheckCorrectThrow("has_own_property(other, 'x')"); |
| 19274 CheckCorrectThrow("%GetProperty(other, 'x')"); | 19274 CheckCorrectThrow("%GetProperty(other, 'x', false)"); |
| 19275 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); | 19275 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); |
| 19276 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); | 19276 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); |
| 19277 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); | 19277 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); |
| 19278 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); | 19278 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); |
| 19279 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); | 19279 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); |
| 19280 CheckCorrectThrow("%HasProperty(other, 'x')"); | 19280 CheckCorrectThrow("%HasProperty(other, 'x')"); |
| 19281 CheckCorrectThrow("%HasElement(other, 1)"); | 19281 CheckCorrectThrow("%HasElement(other, 1)"); |
| 19282 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); | 19282 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); |
| 19283 CheckCorrectThrow("%GetPropertyNames(other)"); | 19283 CheckCorrectThrow("%GetPropertyNames(other)"); |
| 19284 // PROPERTY_ATTRIBUTES_NONE = 0 | 19284 // PROPERTY_ATTRIBUTES_NONE = 0 |
| (...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21454 CHECK_EQ(2U, set->Size()); | 21454 CHECK_EQ(2U, set->Size()); |
| 21455 | 21455 |
| 21456 v8::Local<v8::Array> keys = set->AsArray(); | 21456 v8::Local<v8::Array> keys = set->AsArray(); |
| 21457 CHECK_EQ(2U, keys->Length()); | 21457 CHECK_EQ(2U, keys->Length()); |
| 21458 CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value()); | 21458 CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value()); |
| 21459 CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value()); | 21459 CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value()); |
| 21460 | 21460 |
| 21461 set = v8::Set::FromArray(env.local(), keys).ToLocalChecked(); | 21461 set = v8::Set::FromArray(env.local(), keys).ToLocalChecked(); |
| 21462 CHECK_EQ(2U, set->Size()); | 21462 CHECK_EQ(2U, set->Size()); |
| 21463 } | 21463 } |
| OLD | NEW |