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

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

Issue 1553043002: [builtins] Migrate a bunch of Object builtins to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 12 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/array.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 2de71aa19dd6f0d099507bc241607611235e20ba..5e256bf0bbd698317bf3218ee11d4c1fdd2550aa 100644
--- a/src/js/object-observe.js
+++ b/src/js/object-observe.js
@@ -16,14 +16,10 @@ var GlobalArray = global.Array;
var GlobalObject = global.Object;
var InternalArray = utils.InternalArray;
var MakeTypeError;
-var ObjectFreeze;
-var ObjectIsFrozen;
utils.Import(function(from) {
GetHash = from.GetHash;
MakeTypeError = from.MakeTypeError;
- ObjectFreeze = from.ObjectFreeze;
- ObjectIsFrozen = from.ObjectIsFrozen;
});
// -------------------------------------------------------------------
@@ -388,7 +384,7 @@ function ObjectObserve(object, callback, acceptList) {
throw MakeTypeError(kObserveAccessChecked, "observe");
if (!IS_CALLABLE(callback))
throw MakeTypeError(kObserveNonFunction, "observe");
- if (ObjectIsFrozen(callback))
+ if (%object_is_frozen(callback))
throw MakeTypeError(kObserveCallbackFrozen);
var objectObserveFn = %GetObjectContextObjectObserve(object);
@@ -481,7 +477,7 @@ function ObjectInfoEnqueueExternalChangeRecord(objectInfo, changeRecord, type) {
%DefineDataPropertyUnchecked(
newRecord, prop, changeRecord[prop], READ_ONLY + DONT_DELETE);
}
- ObjectFreeze(newRecord);
+ %object_freeze(newRecord);
ObjectInfoEnqueueInternalChangeRecord(objectInfo, newRecord);
}
@@ -533,8 +529,8 @@ function EnqueueSpliceRecord(array, index, removed, addedCount) {
addedCount: addedCount
};
- ObjectFreeze(changeRecord);
- ObjectFreeze(changeRecord.removed);
+ %object_freeze(changeRecord);
+ %object_freeze(changeRecord.removed);
ObjectInfoEnqueueInternalChangeRecord(objectInfo, changeRecord);
}
@@ -558,7 +554,7 @@ function NotifyChange(type, object, name, oldValue) {
};
}
- ObjectFreeze(changeRecord);
+ %object_freeze(changeRecord);
ObjectInfoEnqueueInternalChangeRecord(objectInfo, changeRecord);
}
@@ -617,7 +613,7 @@ function ObjectGetNotifier(object) {
if (%IsAccessCheckNeeded(object))
throw MakeTypeError(kObserveAccessChecked, "getNotifier");
- if (ObjectIsFrozen(object)) return null;
+ if (%object_is_frozen(object)) return null;
if (!%ObjectWasCreatedInCurrentOrigin(object)) return null;
« no previous file with comments | « src/js/array.js ('k') | src/js/prologue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698