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

Side by Side Diff: src/object-observe.js

Issue 21891008: Don't attempt to transition JSProxy to an observed map / Object.getNotifier() must SetObserved (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | « no previous file | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 } 387 }
388 } 388 }
389 389
390 function ObjectGetNotifier(object) { 390 function ObjectGetNotifier(object) {
391 if (!IS_SPEC_OBJECT(object)) 391 if (!IS_SPEC_OBJECT(object))
392 throw MakeTypeError("observe_non_object", ["getNotifier"]); 392 throw MakeTypeError("observe_non_object", ["getNotifier"]);
393 393
394 if (ObjectIsFrozen(object)) return null; 394 if (ObjectIsFrozen(object)) return null;
395 395
396 var objectInfo = objectInfoMap.get(object); 396 var objectInfo = objectInfoMap.get(object);
397 if (IS_UNDEFINED(objectInfo)) objectInfo = CreateObjectInfo(object); 397 if (IS_UNDEFINED(objectInfo)) {
398 objectInfo = CreateObjectInfo(object);
399 %SetIsObserved(object);
400 }
398 401
399 if (IS_NULL(objectInfo.notifier)) { 402 if (IS_NULL(objectInfo.notifier)) {
400 objectInfo.notifier = { __proto__: notifierPrototype }; 403 objectInfo.notifier = { __proto__: notifierPrototype };
401 notifierTargetMap.set(objectInfo.notifier, object); 404 notifierTargetMap.set(objectInfo.notifier, object);
402 } 405 }
403 406
404 return objectInfo.notifier; 407 return objectInfo.notifier;
405 } 408 }
406 409
407 function CallbackDeliverPending(callback) { 410 function CallbackDeliverPending(callback) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 "observe", ArrayObserve, 456 "observe", ArrayObserve,
454 "unobserve", ArrayUnobserve 457 "unobserve", ArrayUnobserve
455 )); 458 ));
456 InstallFunctions(notifierPrototype, DONT_ENUM, $Array( 459 InstallFunctions(notifierPrototype, DONT_ENUM, $Array(
457 "notify", ObjectNotifierNotify, 460 "notify", ObjectNotifierNotify,
458 "performChange", ObjectNotifierPerformChange 461 "performChange", ObjectNotifierPerformChange
459 )); 462 ));
460 } 463 }
461 464
462 SetupObjectObserve(); 465 SetupObjectObserve();
OLDNEW
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698