| Index: src/object-observe.js
|
| diff --git a/src/object-observe.js b/src/object-observe.js
|
| index 56859a1c97ba9f7729c2b8fb821c6142d6fdb7f1..6f4f20f078178d791c8b3ae3fb5474c53465cf55 100644
|
| --- a/src/object-observe.js
|
| +++ b/src/object-observe.js
|
| @@ -10,6 +10,9 @@ var $observeNativeObjectObserve;
|
| var $observeNativeObjectGetNotifier;
|
| var $observeNativeObjectNotifierPerformChange;
|
|
|
| +var $observeObjectMethods;
|
| +var $observeArrayMethods;
|
| +
|
| (function(global, utils) {
|
|
|
| "use strict";
|
| @@ -676,20 +679,29 @@ function ObserveMicrotaskRunner() {
|
|
|
| // -------------------------------------------------------------------
|
|
|
| -utils.InstallFunctions(GlobalObject, DONT_ENUM, [
|
| +utils.InstallFunctions(notifierPrototype, DONT_ENUM, [
|
| + "notify", ObjectNotifierNotify,
|
| + "performChange", ObjectNotifierPerformChange
|
| +]);
|
| +
|
| +$observeObjectMethods = [
|
| "deliverChangeRecords", ObjectDeliverChangeRecords,
|
| "getNotifier", ObjectGetNotifier,
|
| "observe", ObjectObserve,
|
| "unobserve", ObjectUnobserve
|
| -]);
|
| -utils.InstallFunctions(GlobalArray, DONT_ENUM, [
|
| +];
|
| +$observeArrayMethods = [
|
| "observe", ArrayObserve,
|
| "unobserve", ArrayUnobserve
|
| -]);
|
| -utils.InstallFunctions(notifierPrototype, DONT_ENUM, [
|
| - "notify", ObjectNotifierNotify,
|
| - "performChange", ObjectNotifierPerformChange
|
| -]);
|
| +];
|
| +
|
| +// TODO(adamk): Figure out why this prototype removal has to
|
| +// happen as part of initial snapshotting.
|
| +var removePrototypeFn = function(f, i) {
|
| + if (i % 2 === 1) %FunctionRemovePrototype(f);
|
| +};
|
| +$observeObjectMethods.forEach(removePrototypeFn);
|
| +$observeArrayMethods.forEach(removePrototypeFn);
|
|
|
| $observeNotifyChange = NotifyChange;
|
| $observeEnqueueSpliceRecord = EnqueueSpliceRecord;
|
|
|