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

Unified Diff: src/object-observe.js

Issue 307543008: Simplify, speed-up correct-context ObjectObserve calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: <sigh> remove style fix Created 6 years, 7 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 | « no previous file | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/object-observe.js
diff --git a/src/object-observe.js b/src/object-observe.js
index 03afd3f366b5b41b8a20e3c0d2e729dfa934e2cf..2dfc7522f77ab6db88baf125a0be4ab3707d8092 100644
--- a/src/object-observe.js
+++ b/src/object-observe.js
@@ -368,7 +368,8 @@ function ObjectObserve(object, callback, acceptList) {
if (ObjectIsFrozen(callback))
throw MakeTypeError("observe_callback_frozen");
- return %ObjectObserveInObjectContext(object, callback, acceptList);
+ var objectObserveFn = %GetObjectContextObjectObserve(object);
+ return objectObserveFn(object, callback, acceptList);
}
function NativeObjectObserve(object, callback, acceptList) {
@@ -543,8 +544,8 @@ function ObjectNotifierPerformChange(changeType, changeFn) {
if (!IS_SPEC_FUNCTION(changeFn))
throw MakeTypeError("observe_perform_non_function");
- return %ObjectNotifierPerformChangeInObjectContext(
- objectInfo, changeType, changeFn);
+ var performChangeFn = %GetObjectContextNotifierPerformChange(objectInfo);
+ performChangeFn(objectInfo, changeType, changeFn);
}
function NativeObjectNotifierPerformChange(objectInfo, changeType, changeFn) {
@@ -571,7 +572,8 @@ function ObjectGetNotifier(object) {
if (!%ObjectWasCreatedInCurrentOrigin(object)) return null;
- return %ObjectGetNotifierInObjectContext(object);
+ var getNotifierFn = %GetObjectContextObjectGetNotifier(object);
+ return getNotifierFn(object);
}
function NativeObjectGetNotifier(object) {
« no previous file with comments | « no previous file | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698