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

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

Issue 8133023: Use correct trap for lookup in prototype proxy. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 assertEquals("p_nonconf", key) 602 assertEquals("p_nonconf", key)
603 603
604 assertThrows(function(){ o.p_throw = 51 }, "myexn") 604 assertThrows(function(){ o.p_throw = 51 }, "myexn")
605 assertEquals("p_throw", key) 605 assertEquals("p_throw", key)
606 606
607 assertThrows(function(){ o.p_setterthrow = 52 }, "myexn") 607 assertThrows(function(){ o.p_setterthrow = 52 }, "myexn")
608 assertEquals("p_setterthrow", key) 608 assertEquals("p_setterthrow", key)
609 } 609 }
610 610
611 TestSetForDerived({ 611 TestSetForDerived({
612 getOwnPropertyDescriptor: function(k) { 612 getPropertyDescriptor: function(k) {
613 key = k; 613 key = k;
614 switch (k) { 614 switch (k) {
615 case "p_writable": return {writable: true, configurable: true} 615 case "p_writable": return {writable: true, configurable: true}
616 case "p_nonwritable": return {writable: false, configurable: true} 616 case "p_nonwritable": return {writable: false, configurable: true}
617 case "p_setter":return {set: function(x) { val = x }, configurable: true} 617 case "p_setter":return {set: function(x) { val = x }, configurable: true}
618 case "p_nosetter": return {get: function() { return 1 }, configurable: tru e} 618 case "p_nosetter": return {get: function() { return 1 }, configurable: tru e}
619 case "p_nonconf":return {} 619 case "p_nonconf":return {}
620 case "p_throw": throw "myexn" 620 case "p_throw": throw "myexn"
621 case "p_setterthrow": return {set: function(x) { throw "myexn" }} 621 case "p_setterthrow": return {set: function(x) { throw "myexn" }}
622 default: return undefined 622 default: return undefined
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2346 2346
2347 TestAccessorCall( 2347 TestAccessorCall(
2348 Proxy.createFunction({}, function() { receiver = this; return 42 }), 2348 Proxy.createFunction({}, function() { receiver = this; return 42 }),
2349 Proxy.createFunction({}, function(x) { receiver = this; value = x }) 2349 Proxy.createFunction({}, function(x) { receiver = this; value = x })
2350 ) 2350 )
2351 2351
2352 TestAccessorCall( 2352 TestAccessorCall(
2353 CreateFrozen({}, function() { receiver = this; return 42 }), 2353 CreateFrozen({}, function() { receiver = this; return 42 }),
2354 CreateFrozen({}, function(x) { receiver = this; value = x }) 2354 CreateFrozen({}, function(x) { receiver = this; value = x })
2355 ) 2355 )
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698