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

Side by Side Diff: test/mjsunit/harmony/proxies.js

Issue 1414403003: Fix HasProperty/HasElement for Proxies on the prototype chain (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/objects-inl.h ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 // Property descriptor conversion. 1303 // Property descriptor conversion.
1304 1304
1305 var descget 1305 var descget
1306 1306
1307 function TestDescriptorGetOrder(handler) { 1307 function TestDescriptorGetOrder(handler) {
1308 var p = Proxy.create(handler) 1308 var p = Proxy.create(handler)
1309 var o = Object.create(p, {b: {value: 0}}) 1309 var o = Object.create(p, {b: {value: 0}})
1310 TestDescriptorGetOrder2(function(n) { return p[n] }, "vV") 1310 TestDescriptorGetOrder2(function(n) { return p[n] }, "vV")
1311 TestDescriptorGetOrder2(function(n) { return n in p }, "") 1311 TestDescriptorGetOrder2(function(n) { return n in p }, "")
1312 TestDescriptorGetOrder2(function(n) { return o[n] }, "vV") 1312 TestDescriptorGetOrder2(function(n) { return o[n] }, "vV")
1313 TestDescriptorGetOrder2(function(n) { return n in o }, "eEcCvVwWgs") 1313 TestDescriptorGetOrder2(function(n) { return n in o }, "")
1314 } 1314 }
1315 1315
1316 function TestDescriptorGetOrder2(f, access) { 1316 function TestDescriptorGetOrder2(f, access) {
1317 descget = "" 1317 descget = ""
1318 assertTrue(f("a")) 1318 assertTrue(f("a"))
1319 assertEquals(access, descget) 1319 assertEquals(access, descget)
1320 descget = "" 1320 descget = ""
1321 assertTrue(f(99)) 1321 assertTrue(f(99))
1322 assertEquals(access, descget) 1322 assertEquals(access, descget)
1323 descget = "" 1323 descget = ""
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 function f() { 2321 function f() {
2322 return o.x; 2322 return o.x;
2323 } 2323 }
2324 assertEquals(10, f()); 2324 assertEquals(10, f());
2325 assertEquals(10, f()); 2325 assertEquals(10, f());
2326 %OptimizeFunctionOnNextCall(f); 2326 %OptimizeFunctionOnNextCall(f);
2327 assertEquals(10, f()); 2327 assertEquals(10, f());
2328 } 2328 }
2329 2329
2330 TestOptWithProxyPrototype(); 2330 TestOptWithProxyPrototype();
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698