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

Side by Side Diff: test/cctest/test-api.cc

Issue 1185343005: Revert of Revert of [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | test/mjsunit/strong/functions.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 19338 matching lines...) Expand 10 before | Expand all | Expand 10 after
19349 access_check_fail_thrown = false; 19349 access_check_fail_thrown = false;
19350 CompileRun("other.x;"); 19350 CompileRun("other.x;");
19351 CHECK(access_check_fail_thrown); 19351 CHECK(access_check_fail_thrown);
19352 CHECK(try_catch.HasCaught()); 19352 CHECK(try_catch.HasCaught());
19353 } 19353 }
19354 19354
19355 CheckCorrectThrow("other.x"); 19355 CheckCorrectThrow("other.x");
19356 CheckCorrectThrow("other[1]"); 19356 CheckCorrectThrow("other[1]");
19357 CheckCorrectThrow("JSON.stringify(other)"); 19357 CheckCorrectThrow("JSON.stringify(other)");
19358 CheckCorrectThrow("has_own_property(other, 'x')"); 19358 CheckCorrectThrow("has_own_property(other, 'x')");
19359 CheckCorrectThrow("%GetProperty(other, 'x')"); 19359 CheckCorrectThrow("%GetProperty(other, 'x', 0)");
19360 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)"); 19360 CheckCorrectThrow("%SetProperty(other, 'x', 'foo', 0)");
19361 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)"); 19361 CheckCorrectThrow("%AddNamedProperty(other, 'x', 'foo', 1)");
19362 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)"); 19362 CheckCorrectThrow("%DeleteProperty(other, 'x', 0)");
19363 CheckCorrectThrow("%DeleteProperty(other, '1', 0)"); 19363 CheckCorrectThrow("%DeleteProperty(other, '1', 0)");
19364 CheckCorrectThrow("%HasOwnProperty(other, 'x')"); 19364 CheckCorrectThrow("%HasOwnProperty(other, 'x')");
19365 CheckCorrectThrow("%HasProperty(other, 'x')"); 19365 CheckCorrectThrow("%HasProperty(other, 'x')");
19366 CheckCorrectThrow("%HasElement(other, 1)"); 19366 CheckCorrectThrow("%HasElement(other, 1)");
19367 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')"); 19367 CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')");
19368 CheckCorrectThrow("%GetPropertyNames(other)"); 19368 CheckCorrectThrow("%GetPropertyNames(other)");
19369 // PROPERTY_ATTRIBUTES_NONE = 0 19369 // PROPERTY_ATTRIBUTES_NONE = 0
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
21607 CHECK_EQ(2U, set->Size()); 21607 CHECK_EQ(2U, set->Size());
21608 21608
21609 v8::Local<v8::Array> keys = set->AsArray(); 21609 v8::Local<v8::Array> keys = set->AsArray();
21610 CHECK_EQ(2U, keys->Length()); 21610 CHECK_EQ(2U, keys->Length());
21611 CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value()); 21611 CHECK_EQ(1, keys->Get(0).As<v8::Int32>()->Value());
21612 CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value()); 21612 CHECK_EQ(2, keys->Get(1).As<v8::Int32>()->Value());
21613 21613
21614 set = v8::Set::FromArray(env.local(), keys).ToLocalChecked(); 21614 set = v8::Set::FromArray(env.local(), keys).ToLocalChecked();
21615 CHECK_EQ(2U, set->Size()); 21615 CHECK_EQ(2U, set->Size());
21616 } 21616 }
OLDNEW
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | test/mjsunit/strong/functions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698