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

Unified Diff: src/js/object-observe.js

Issue 1396323011: Native context: use import/export for Object observe related functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/harmony-object-observe.js ('k') | src/js/prologue.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/object-observe.js
diff --git a/src/js/object-observe.js b/src/js/object-observe.js
index 80296586d214093751c38aa661d34a7280d0bd7b..44bcbea192d77cdba99cb05ac6eb0efbccbad48c 100644
--- a/src/js/object-observe.js
+++ b/src/js/object-observe.js
@@ -2,13 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var $observeEnqueueSpliceRecord;
-var $observeBeginPerformSplice;
-var $observeEndPerformSplice;
-
-var $observeObjectMethods;
-var $observeArrayMethods;
-
(function(global, utils) {
"use strict";
@@ -684,13 +677,14 @@ utils.InstallFunctions(notifierPrototype, DONT_ENUM, [
"performChange", ObjectNotifierPerformChange
]);
-$observeObjectMethods = [
+var ObserveObjectMethods = [
"deliverChangeRecords", ObjectDeliverChangeRecords,
"getNotifier", ObjectGetNotifier,
"observe", ObjectObserve,
"unobserve", ObjectUnobserve
];
-$observeArrayMethods = [
+
+var ObserveArrayMethods = [
"observe", ArrayObserve,
"unobserve", ArrayUnobserve
];
@@ -700,12 +694,8 @@ $observeArrayMethods = [
var removePrototypeFn = function(f, i) {
if (i % 2 === 1) %FunctionRemovePrototype(f);
};
-$observeObjectMethods.forEach(removePrototypeFn);
-$observeArrayMethods.forEach(removePrototypeFn);
-
-$observeEnqueueSpliceRecord = EnqueueSpliceRecord;
-$observeBeginPerformSplice = BeginPerformSplice;
-$observeEndPerformSplice = EndPerformSplice;
+ObserveObjectMethods.forEach(removePrototypeFn);
+ObserveArrayMethods.forEach(removePrototypeFn);
%InstallToContext([
"native_object_get_notifier", NativeObjectGetNotifier,
@@ -717,4 +707,12 @@ $observeEndPerformSplice = EndPerformSplice;
"observers_notify_change", NotifyChange,
]);
+utils.Export(function(to) {
+ to.ObserveArrayMethods = ObserveArrayMethods;
+ to.ObserveBeginPerformSplice = BeginPerformSplice;
+ to.ObserveEndPerformSplice = EndPerformSplice;
+ to.ObserveEnqueueSpliceRecord = EnqueueSpliceRecord;
+ to.ObserveObjectMethods = ObserveObjectMethods;
+});
+
})
« no previous file with comments | « src/js/harmony-object-observe.js ('k') | src/js/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698