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

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

Issue 1293493003: Do not export natives to runtime via js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/messages.js ('k') | src/prologue.js » ('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 // 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
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 })
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698