OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 var $observeNotifyChange; | |
6 var $observeEnqueueSpliceRecord; | 5 var $observeEnqueueSpliceRecord; |
7 var $observeBeginPerformSplice; | 6 var $observeBeginPerformSplice; |
8 var $observeEndPerformSplice; | 7 var $observeEndPerformSplice; |
9 var $observeNativeObjectObserve; | |
10 var $observeNativeObjectGetNotifier; | |
11 var $observeNativeObjectNotifierPerformChange; | |
12 | 8 |
13 var $observeObjectMethods; | 9 var $observeObjectMethods; |
14 var $observeArrayMethods; | 10 var $observeArrayMethods; |
15 | 11 |
16 (function(global, utils) { | 12 (function(global, utils) { |
17 | 13 |
18 "use strict"; | 14 "use strict"; |
19 | 15 |
20 %CheckIsBootstrapping(); | 16 %CheckIsBootstrapping(); |
21 | 17 |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
696 ]; | 692 ]; |
697 | 693 |
698 // TODO(adamk): Figure out why this prototype removal has to | 694 // TODO(adamk): Figure out why this prototype removal has to |
699 // happen as part of initial snapshotting. | 695 // happen as part of initial snapshotting. |
700 var removePrototypeFn = function(f, i) { | 696 var removePrototypeFn = function(f, i) { |
701 if (i % 2 === 1) %FunctionRemovePrototype(f); | 697 if (i % 2 === 1) %FunctionRemovePrototype(f); |
702 }; | 698 }; |
703 $observeObjectMethods.forEach(removePrototypeFn); | 699 $observeObjectMethods.forEach(removePrototypeFn); |
704 $observeArrayMethods.forEach(removePrototypeFn); | 700 $observeArrayMethods.forEach(removePrototypeFn); |
705 | 701 |
706 $observeNotifyChange = NotifyChange; | |
707 $observeEnqueueSpliceRecord = EnqueueSpliceRecord; | 702 $observeEnqueueSpliceRecord = EnqueueSpliceRecord; |
708 $observeBeginPerformSplice = BeginPerformSplice; | 703 $observeBeginPerformSplice = BeginPerformSplice; |
709 $observeEndPerformSplice = EndPerformSplice; | 704 $observeEndPerformSplice = EndPerformSplice; |
710 $observeNativeObjectObserve = NativeObjectObserve; | 705 |
711 $observeNativeObjectGetNotifier = NativeObjectGetNotifier; | 706 utils.ExportToRuntime(function(to) { |
712 $observeNativeObjectNotifierPerformChange = NativeObjectNotifierPerformChange; | 707 to.ObserveNotifyChange = NotifyChange; |
| 708 to.ObserveEnqueueSpliceRecord = EnqueueSpliceRecord; |
| 709 to.ObserveBeginPerformSplice = BeginPerformSplice; |
| 710 to.ObserveEndPerformSplice = EndPerformSplice; |
| 711 to.ObserveNativeObjectObserve = NativeObjectObserve; |
| 712 to.ObserveNativeObjectGetNotifier = NativeObjectGetNotifier; |
| 713 to.ObserveNativeObjectNotifierPerformChange = |
| 714 NativeObjectNotifierPerformChange; |
| 715 }); |
713 | 716 |
714 }) | 717 }) |
OLD | NEW |