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

Side by Side Diff: test/mjsunit/strong/load-proxy.js

Issue 1427743011: [proxies] Remove "fix" functionality, add (still unused) target property. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test Created 5 years, 1 month 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 | « test/mjsunit/harmony/regress/regress-405844.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-proxies --strong-mode 5 // Flags: --harmony-proxies --strong-mode
6 6
7 // Forwarding proxies adapted from proposal definition 7 // Forwarding proxies adapted from proposal definition
8 function handlerMaker1(obj) { 8 function handlerMaker1(obj) {
9 return { 9 return {
10 getPropertyDescriptor: function(name) { 10 getPropertyDescriptor: function(name) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 assertThrows(function(){baseObj[1]}, TypeError); 73 assertThrows(function(){baseObj[1]}, TypeError);
74 assertThrows(function(){childObjAccessor1.foo}, TypeError); 74 assertThrows(function(){childObjAccessor1.foo}, TypeError);
75 assertThrows(function(){childObjAccessor1[1]}, TypeError); 75 assertThrows(function(){childObjAccessor1[1]}, TypeError);
76 assertThrows(function(){childObjAccessor2.foo}, TypeError); 76 assertThrows(function(){childObjAccessor2.foo}, TypeError);
77 assertThrows(function(){childObjAccessor2[1]}, TypeError); 77 assertThrows(function(){childObjAccessor2[1]}, TypeError);
78 78
79 // Once the proxy is no longer trapping, property access should have strong 79 // Once the proxy is no longer trapping, property access should have strong
80 // semantics. 80 // semantics.
81 Object.freeze(baseObj); 81 Object.freeze(baseObj);
82 82
83 Object.freeze(proxy1); 83 // TODO(neis): Reenable once proxies properly support freeze.
84 assertThrows(function(){proxy1.foo}, TypeError); 84 //
85 assertThrows(function(){proxy1[1]}, TypeError); 85 // Object.freeze(proxy1);
86 assertThrows(function(){childObj1.foo}, TypeError); 86 // assertThrows(function(){proxy1.foo}, TypeError);
87 assertThrows(function(){childObj1[1]}, TypeError); 87 // assertThrows(function(){proxy1[1]}, TypeError);
88 assertThrows(function(){childObjAccessor1.foo}, TypeError); 88 // assertThrows(function(){childObj1.foo}, TypeError);
89 assertThrows(function(){childObjAccessor1[1]}, TypeError); 89 // assertThrows(function(){childObj1[1]}, TypeError);
90 90 // assertThrows(function(){childObjAccessor1.foo}, TypeError);
91 Object.freeze(proxy2); 91 // assertThrows(function(){childObjAccessor1[1]}, TypeError);
92 assertThrows(function(){proxy2.foo}, TypeError); 92 //
93 assertThrows(function(){proxy2[1]}, TypeError); 93 // Object.freeze(proxy2);
94 assertThrows(function(){childObj2.foo}, TypeError); 94 // assertThrows(function(){proxy2.foo}, TypeError);
95 assertThrows(function(){childObj2[1]}, TypeError); 95 // assertThrows(function(){proxy2[1]}, TypeError);
96 assertThrows(function(){childObjAccessor2.foo}, TypeError); 96 // assertThrows(function(){childObj2.foo}, TypeError);
97 assertThrows(function(){childObjAccessor2[1]}, TypeError); 97 // assertThrows(function(){childObj2[1]}, TypeError);
98 // assertThrows(function(){childObjAccessor2.foo}, TypeError);
99 // assertThrows(function(){childObjAccessor2[1]}, TypeError);
98 })(); 100 })();
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/regress/regress-405844.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698