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

Unified Diff: src/v8natives.js

Issue 1086813005: Wrap object observe implementation in a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/object-observe.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index d050a9e2c479dafdb311a4fd1a4f5e5d4497fe0f..8c9732ea2f029a670a7dd8f8f749f54bc1c65f8b 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -909,7 +909,7 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
var emit_splice = %IsObserved(obj) && new_length !== old_length;
var removed;
if (emit_splice) {
- BeginPerformSplice(obj);
+ $observeBeginPerformSplice(obj);
removed = [];
if (new_length < old_length)
removed.length = old_length - new_length;
@@ -930,8 +930,8 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
}
threw = !DefineObjectProperty(obj, "length", desc, should_throw) || threw;
if (emit_splice) {
- EndPerformSplice(obj);
- EnqueueSpliceRecord(obj,
+ $observeEndPerformSplice(obj);
+ $observeEnqueueSpliceRecord(obj,
new_length < old_length ? new_length : old_length,
removed,
new_length > old_length ? new_length - old_length : 0);
@@ -954,14 +954,14 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
var length = obj.length;
if (index >= length && %IsObserved(obj)) {
emit_splice = true;
- BeginPerformSplice(obj);
+ $observeBeginPerformSplice(obj);
}
var length_desc = GetOwnPropertyJS(obj, "length");
if ((index >= length && !length_desc.isWritable()) ||
!DefineObjectProperty(obj, p, desc, true)) {
if (emit_splice)
- EndPerformSplice(obj);
+ $observeEndPerformSplice(obj);
if (should_throw) {
throw MakeTypeError("define_disallowed", [p]);
} else {
@@ -972,8 +972,8 @@ function DefineArrayProperty(obj, p, desc, should_throw) {
obj.length = index + 1;
}
if (emit_splice) {
- EndPerformSplice(obj);
- EnqueueSpliceRecord(obj, length, [], index + 1 - length);
+ $observeEndPerformSplice(obj);
+ $observeEnqueueSpliceRecord(obj, length, [], index + 1 - length);
}
return true;
}
« no previous file with comments | « src/object-observe.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698