Index: src/object-observe.js |
diff --git a/src/object-observe.js b/src/object-observe.js |
index c90c6c7af1d058387ed6482be045009c4587a25a..219d7b72d521c3b2b9cbde526c04ce06294dd829 100644 |
--- a/src/object-observe.js |
+++ b/src/object-observe.js |
@@ -22,6 +22,14 @@ |
var GlobalArray = global.Array; |
var GlobalObject = global.Object; |
var InternalArray = utils.InternalArray; |
+ |
+var ObjectFreeze; |
+var ObjectIsFrozen; |
+ |
+utils.Import(function(from) { |
+ ObjectFreeze = from.ObjectFreeze; |
+ ObjectIsFrozen = from.ObjectIsFrozen; |
+}); |
// ------------------------------------------------------------------- |
@@ -380,7 +388,7 @@ |
throw MakeTypeError(kObserveGlobalProxy, "observe"); |
if (!IS_SPEC_FUNCTION(callback)) |
throw MakeTypeError(kObserveNonFunction, "observe"); |
- if ($objectIsFrozen(callback)) |
+ if (ObjectIsFrozen(callback)) |
throw MakeTypeError(kObserveCallbackFrozen); |
var objectObserveFn = %GetObjectContextObjectObserve(object); |
@@ -473,7 +481,7 @@ |
%DefineDataPropertyUnchecked( |
newRecord, prop, changeRecord[prop], READ_ONLY + DONT_DELETE); |
} |
- $objectFreeze(newRecord); |
+ ObjectFreeze(newRecord); |
ObjectInfoEnqueueInternalChangeRecord(objectInfo, newRecord); |
} |
@@ -525,8 +533,8 @@ |
addedCount: addedCount |
}; |
- $objectFreeze(changeRecord); |
- $objectFreeze(changeRecord.removed); |
+ ObjectFreeze(changeRecord); |
+ ObjectFreeze(changeRecord.removed); |
ObjectInfoEnqueueInternalChangeRecord(objectInfo, changeRecord); |
} |
@@ -550,7 +558,7 @@ |
}; |
} |
- $objectFreeze(changeRecord); |
+ ObjectFreeze(changeRecord); |
ObjectInfoEnqueueInternalChangeRecord(objectInfo, changeRecord); |
} |
@@ -607,7 +615,7 @@ |
if (%IsJSGlobalProxy(object)) |
throw MakeTypeError(kObserveGlobalProxy, "getNotifier"); |
- if ($objectIsFrozen(object)) return null; |
+ if (ObjectIsFrozen(object)) return null; |
if (!%ObjectWasCreatedInCurrentOrigin(object)) return null; |
@@ -665,17 +673,17 @@ |
// ------------------------------------------------------------------- |
-$installFunctions(GlobalObject, DONT_ENUM, [ |
+utils.InstallFunctions(GlobalObject, DONT_ENUM, [ |
"deliverChangeRecords", ObjectDeliverChangeRecords, |
"getNotifier", ObjectGetNotifier, |
"observe", ObjectObserve, |
"unobserve", ObjectUnobserve |
]); |
-$installFunctions(GlobalArray, DONT_ENUM, [ |
+utils.InstallFunctions(GlobalArray, DONT_ENUM, [ |
"observe", ArrayObserve, |
"unobserve", ArrayUnobserve |
]); |
-$installFunctions(notifierPrototype, DONT_ENUM, [ |
+utils.InstallFunctions(notifierPrototype, DONT_ENUM, [ |
"notify", ObjectNotifierNotify, |
"performChange", ObjectNotifierPerformChange |
]); |