Lines Matching refs:object

13   function restore(object, oldProto) {
14 delete object[Symbol.unscopables];
15 delete object.x;
16 delete object.x_;
17 delete object.y;
18 delete object.z;
19 Object.setPrototypeOf(object, oldProto);
61 var object = getObject(i);
62 var oldObjectProto = Object.getPrototypeOf(object);
63 f(object);
64 restore(object, oldObjectProto);
69 var object = getObject(i);
71 if (object === proto) {
74 var oldObjectProto = Object.getPrototypeOf(object);
76 f(object, proto);
77 restore(object, oldObjectProto);
120 function TestBasics(object) {
124 object.x = 4;
125 object.y = 5;
127 with (object) {
133 object[Symbol.unscopables] = {x: true};
134 with (object) {
140 object[Symbol.unscopables] = {x: 0, y: true};
141 with (object) {
150 function TestUnscopableChain(object) {
152 object.x = 2;
154 with (object) {
158 object[Symbol.unscopables] = {
161 with (object) {
168 function TestBasicsSet(object) {
170 object.x = 2;
172 with (object) {
176 object[Symbol.unscopables] = {x: true};
177 with (object) {
184 assertEquals(2, object.x);
189 function TestOnProto(object, proto) {
195 Object.setPrototypeOf(object, proto);
196 object.y = 5;
198 with (object) {
205 with (object) {
211 object[Symbol.unscopables] = {y: true};
212 with (object) {
219 object[Symbol.unscopables] = {x: true};
220 with (object) {
229 function TestSetBlockedOnProto(object, proto) {
231 object.x = 2;
233 with (object) {
237 Object.setPrototypeOf(object, proto);
239 with (object) {
246 assertEquals(2, object.x);
251 function TestNonObject(object) {
254 object.x = 3;
255 object.y = 4;
257 object[Symbol.unscopables] = 'xy';
258 with (object) {
263 object[Symbol.unscopables] = null;
264 with (object) {
272 function TestChangeDuringWith(object) {
275 object.x = 3;
276 object.y = 4;
278 with (object) {
281 object[Symbol.unscopables] = {x: true};
289 function TestChangeDuringWithWithPossibleOptimization(object) {
291 object.x = 2;
292 with (object) {
294 if (i === 500) object[Symbol.unscopables] = {x: true};
302 function TestChangeDuringWithWithPossibleOptimization2(object) {
304 object.x = 2;
305 object[Symbol.unscopables] = {x: true};
306 with (object) {
308 if (i === 500) delete object[Symbol.unscopables];
316 function TestChangeDuringWithWithPossibleOptimization3(object) {
318 object.x = 2;
319 object[Symbol.unscopables] = {};
320 with (object) {
322 if (i === 500) object[Symbol.unscopables].x = true;
330 function TestChangeDuringWithWithPossibleOptimization4(object) {
332 object.x = 2;
333 object[Symbol.unscopables] = {x: true};
334 with (object) {
336 if (i === 500) delete object[Symbol.unscopables].x;
344 function TestAccessorReceiver(object, proto) {
349 assertEquals(object, this);
356 Object.setPrototypeOf(object, proto);
357 proto.x_ = 'object';
359 with (object) {
360 assertEquals('object', x);
366 function TestUnscopablesGetter(object) {
367 // This test gets really messy when object is the global since the assert
368 // functions are properties on the global object and the call count gets
370 if (object === global) return;
373 object.x = 'object';
376 Object.defineProperty(object, Symbol.unscopables, {
383 with (object) {
384 assertEquals('object', x);
390 Object.defineProperty(object, Symbol.unscopables, {
397 with (object) {
404 Object.defineProperty(object, Symbol.unscopables, {
411 with (object) {
416 assertEquals(1, object.x);
418 with (object) {
423 assertEquals(1, object.x);
438 objects.forEach(function(object) {
441 assertEquals(object, this);
447 object.__proto__ = proto;
448 Object.defineProperty(object, 'x', {
450 assertEquals(object, this);
451 return 'object';
456 with (object) {
457 assertEquals('object', x);
460 object[Symbol.unscopables] = {x: true};
461 with (object) {
466 delete object[Symbol.unscopables];
476 function TestSetterOnBlacklisted(object, proto) {
487 Object.setPrototypeOf(object, proto);
488 Object.defineProperty(object, 'x', {
497 object.x_ = 1;
499 with (object) {
504 assertEquals(2, object.x);
506 object[Symbol.unscopables] = {x: true};
508 with (object) {
513 assertEquals(2, object.x);
518 function TestObjectsAsUnscopables(object, unscopables) {
520 object.x = 2;
522 with (object) {
524 object[Symbol.unscopables] = unscopables;
531 function TestAccessorOnUnscopables(object) {
533 object.x = 2;
541 with (object) {
543 object[Symbol.unscopables] = unscopables;
550 function TestLengthUnscopables(object, proto) {
552 with (object) {
554 object[Symbol.unscopables] = {length: true};
556 delete object[Symbol.unscopables];
565 function TestFunctionNameUnscopables(object) {
567 with (object) {
569 object[Symbol.unscopables] = {name: true};
571 delete object[Symbol.unscopables];
644 var object = {
650 Object.defineProperty(object, Symbol.unscopables, {
656 with (object) {