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

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

Issue 8391005: Handle proxies in KeyedStoreIC::Store, instead of just ignoring them. (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/ic.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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 var p = create(handler) 343 var p = create(handler)
344 assertEquals(42, p.a = 42) 344 assertEquals(42, p.a = 42)
345 assertEquals("a", key) 345 assertEquals("a", key)
346 assertEquals(42, val) 346 assertEquals(42, val)
347 assertEquals(43, p["b"] = 43) 347 assertEquals(43, p["b"] = 43)
348 assertEquals("b", key) 348 assertEquals("b", key)
349 assertEquals(43, val) 349 assertEquals(43, val)
350 assertEquals(44, p[77] = 44) 350 assertEquals(44, p[77] = 44)
351 assertEquals("77", key) 351 assertEquals("77", key)
352 assertEquals(44, val) 352 assertEquals(44, val)
353
354 assertEquals(45, (function(n) { return p[n] = 45 })("c"))
355 assertEquals("c", key)
356 assertEquals(45, val)
357 assertEquals(46, (function(n) { return p[n] = 46 })(99))
358 assertEquals("99", key)
359 assertEquals(46, val)
353 } 360 }
354 361
355 TestSet({ 362 TestSet({
356 set: function(r, k, v) { key = k; val = v; return true } 363 set: function(r, k, v) { key = k; val = v; return true }
357 }) 364 })
358 365
359 TestSet({ 366 TestSet({
360 set: function(r, k, v) { return this.set2(r, k, v) }, 367 set: function(r, k, v) { return this.set2(r, k, v) },
361 set2: function(r, k, v) { key = k; val = v; return true } 368 set2: function(r, k, v) { key = k; val = v; return true }
362 }) 369 })
(...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 2164
2158 TestIsEnumerableThrow(Proxy.create({ 2165 TestIsEnumerableThrow(Proxy.create({
2159 get: function(pr, pk) { throw "myexn" } 2166 get: function(pr, pk) { throw "myexn" }
2160 })) 2167 }))
2161 2168
2162 TestIsEnumerableThrow(Proxy.create({ 2169 TestIsEnumerableThrow(Proxy.create({
2163 get: function(pr, pk) { 2170 get: function(pr, pk) {
2164 return function(k) { throw "myexn" } 2171 return function(k) { throw "myexn" }
2165 } 2172 }
2166 })) 2173 }))
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698