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

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

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 3 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/parser.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 // 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 $observeEnqueueSpliceRecord; 5 var $observeEnqueueSpliceRecord;
6 var $observeBeginPerformSplice; 6 var $observeBeginPerformSplice;
7 var $observeEndPerformSplice; 7 var $observeEndPerformSplice;
8 8
9 var $observeObjectMethods; 9 var $observeObjectMethods;
10 var $observeArrayMethods; 10 var $observeArrayMethods;
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 var removePrototypeFn = function(f, i) { 696 var removePrototypeFn = function(f, i) {
697 if (i % 2 === 1) %FunctionRemovePrototype(f); 697 if (i % 2 === 1) %FunctionRemovePrototype(f);
698 }; 698 };
699 $observeObjectMethods.forEach(removePrototypeFn); 699 $observeObjectMethods.forEach(removePrototypeFn);
700 $observeArrayMethods.forEach(removePrototypeFn); 700 $observeArrayMethods.forEach(removePrototypeFn);
701 701
702 $observeEnqueueSpliceRecord = EnqueueSpliceRecord; 702 $observeEnqueueSpliceRecord = EnqueueSpliceRecord;
703 $observeBeginPerformSplice = BeginPerformSplice; 703 $observeBeginPerformSplice = BeginPerformSplice;
704 $observeEndPerformSplice = EndPerformSplice; 704 $observeEndPerformSplice = EndPerformSplice;
705 705
706 utils.ExportToRuntime(function(to) { 706 %InstallToContext([
707 to["native_object_get_notifier"] = NativeObjectGetNotifier; 707 "native_object_get_notifier", NativeObjectGetNotifier,
708 to["native_object_notifier_perform_change"] = 708 "native_object_notifier_perform_change", NativeObjectNotifierPerformChange,
709 NativeObjectNotifierPerformChange; 709 "native_object_observe", NativeObjectObserve,
710 to["native_object_observe"] = NativeObjectObserve; 710 "observers_begin_perform_splice", BeginPerformSplice,
711 to["observers_begin_perform_splice"] = BeginPerformSplice; 711 "observers_end_perform_splice", EndPerformSplice,
712 to["observers_end_perform_splice"] = EndPerformSplice; 712 "observers_enqueue_splice", EnqueueSpliceRecord,
713 to["observers_enqueue_splice"] = EnqueueSpliceRecord; 713 "observers_notify_change", NotifyChange,
714 to["observers_notify_change"] = NotifyChange; 714 ]);
715 });
716 715
717 }) 716 })
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698