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 19311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19322 access_check_fail_thrown = false; | 19322 access_check_fail_thrown = false; |
19323 CompileRun("other.x;"); | 19323 CompileRun("other.x;"); |
19324 CHECK(access_check_fail_thrown); | 19324 CHECK(access_check_fail_thrown); |
19325 CHECK(try_catch.HasCaught()); | 19325 CHECK(try_catch.HasCaught()); |
19326 } | 19326 } |
19327 | 19327 |
19328 CheckCorrectThrow("other.x"); | 19328 CheckCorrectThrow("other.x"); |
19329 CheckCorrectThrow("other[1]"); | 19329 CheckCorrectThrow("other[1]"); |
19330 CheckCorrectThrow("JSON.stringify(other)"); | 19330 CheckCorrectThrow("JSON.stringify(other)"); |
19331 CheckCorrectThrow("has_own_property(other, 'x')"); | 19331 CheckCorrectThrow("has_own_property(other, 'x')"); |
19332 CheckCorrectThrow("%GetProperty(other, 'x')"); | 19332 CheckCorrectThrow("%GetProperty(other, 'x', 0)"); |
19333 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); | 19333 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); |
19334 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); | 19334 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); |
19335 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); | 19335 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); |
19336 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); | 19336 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); |
19337 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); | 19337 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); |
19338 CheckCorrectThrow("%HasProperty(other, 'x')"); | 19338 CheckCorrectThrow("%HasProperty(other, 'x')"); |
19339 CheckCorrectThrow("%HasElement(other, 1)"); | 19339 CheckCorrectThrow("%HasElement(other, 1)"); |
19340 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); | 19340 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); |
19341 CheckCorrectThrow("%GetPropertyNames(other)"); | 19341 CheckCorrectThrow("%GetPropertyNames(other)"); |
19342 // PROPERTY_ATTRIBUTES_NONE = 0 | 19342 // PROPERTY_ATTRIBUTES_NONE = 0 |
(...skipping 2169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21512 CHECK_EQ(2U, set->Size()); | 21512 CHECK_EQ(2U, set->Size()); |
21513 | 21513 |
21514 v8::Local<v8::Array> keys = set->AsArray(); | 21514 v8::Local<v8::Array> keys = set->AsArray(); |
21515 CHECK_EQ(2U, keys->Length()); | 21515 CHECK_EQ(2U, keys->Length()); |
21516 CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value()); | 21516 CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value()); |
21517 CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value()); | 21517 CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value()); |
21518 | 21518 |
21519 set = v8::Set::FromArray(env.local(), keys).ToLocalChecked(); | 21519 set = v8::Set::FromArray(env.local(), keys).ToLocalChecked(); |
21520 CHECK_EQ(2U, set->Size()); | 21520 CHECK_EQ(2U, set->Size()); |
21521 } | 21521 } |
OLD | NEW |