Lines Matching refs:object
32 // This file contains all of the routing and accounting for Object.observe.
33 // User code will interact with these mechanisms via the Object.observe APIs
36 // proper change records for objects which were mutated. The Object.observe
39 // 1) ObjectInfo. This represents the observed state of a given object. It
40 // records what callbacks are observing the object, with what options, and
41 // what "change types" are in progress on the object (i.e. via
51 // (i.e. not Object.deliverChangeRecords), this is the mechanism by which
139 // An Observer is a registration to observe an object by a callback with
141 // set for Object.observe, the observer is represented as a direct reference
165 function ObjectInfoGet(object) {
166 var objectInfo = objectInfoMap.get(object);
168 if (!%IsJSProxy(object))
169 %SetIsObserved(object);
172 object: object,
178 objectInfoMap.set(object, objectInfo);
197 return objectInfo.object;
205 // The set of observers on an object is called 'changeObservers'. The first
326 function ObjectObserve(object, callback, acceptList) {
327 if (!IS_SPEC_OBJECT(object))
336 var objectInfo = ObjectInfoGet(object);
338 return object;
341 function ObjectUnobserve(object, callback) {
342 if (!IS_SPEC_OBJECT(object))
347 var objectInfo = objectInfoMap.get(object);
349 return object;
352 return object;
355 function ArrayObserve(object, callback) {
356 return ObjectObserve(object, callback, ['add',
362 function ArrayUnobserve(object, callback) {
363 return ObjectUnobserve(object, callback);
378 callback, changeRecord.object, changeRecord.name))) {
396 { object: ObjectInfoGetObject(objectInfo), type: type } :
397 { object: ObjectInfoGetObject(objectInfo) };
400 if (prop === 'object' || (hasType && prop === 'type')) continue;
416 %IsAccessCheckNeeded(changeRecord.object);
451 object: array,
462 function NotifyChange(type, object, name, oldValue) {
463 var objectInfo = objectInfoMap.get(object);
469 changeRecord = { type: type, object: object };
471 changeRecord = { type: type, object: object, name: name };
475 object: object,
526 function ObjectGetNotifier(object) {
527 if (!IS_SPEC_OBJECT(object))
530 if (ObjectIsFrozen(object)) return null;
532 var objectInfo = ObjectInfoGet(object);
578 InstallFunctions($Object, DONT_ENUM, $Array(