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

Unified Diff: src/js/v8natives.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/prologue.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index 34c35031b2601dd4c1ef614c877668d307502569..2f2d3b9cf7bc8784c29ec3bf59e276a26d49fabe 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -18,6 +18,9 @@ var GlobalObject = global.Object;
var InternalArray = utils.InternalArray;
var iteratorSymbol = utils.ImportNow("iterator_symbol");
var MathAbs;
+var ObserveBeginPerformSplice;
+var ObserveEndPerformSplice;
+var ObserveEnqueueSpliceRecord;
var ProxyDelegateCallAndConstruct;
var ProxyDerivedHasOwnTrap;
var ProxyDerivedKeysTrap;
@@ -26,6 +29,9 @@ var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
MathAbs = from.MathAbs;
+ ObserveBeginPerformSplice = from.ObserveBeginPerformSplice;
+ ObserveEndPerformSplice = from.ObserveEndPerformSplice;
+ ObserveEnqueueSpliceRecord = from.ObserveEnqueueSpliceRecord;
StringIndexOf = from.StringIndexOf;
});
@@ -806,14 +812,14 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
var length = obj.length;
if (index >= length && %IsObserved(obj)) {
emit_splice = true;
- $observeBeginPerformSplice(obj);
+ ObserveBeginPerformSplice(obj);
}
var length_desc = GetOwnPropertyJS(obj, "length");
if ((index >= length && !length_desc.isWritable()) ||
!DefineObjectProperty(obj, p, desc, true)) {
if (emit_splice)
- $observeEndPerformSplice(obj);
+ ObserveEndPerformSplice(obj);
if (should_throw) {
throw MakeTypeError(kDefineDisallowed, p);
} else {
@@ -824,8 +830,8 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
obj.length = index + 1;
}
if (emit_splice) {
- $observeEndPerformSplice(obj);
- $observeEnqueueSpliceRecord(obj, length, [], index + 1 - length);
+ ObserveEndPerformSplice(obj);
+ ObserveEnqueueSpliceRecord(obj, length, [], index + 1 - length);
}
return true;
}
« no previous file with comments | « src/js/prologue.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698