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

Unified Diff: src/object-observe.js

Issue 150103012: Revert "Implement Microtask Delivery Queue" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/promise.js » ('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 7bed924abaa2b3d113bdf9d7d3fdb38d4af385c5..499b27eca1bef61b76b367f591fbc66413cd09bd 100644
--- a/src/object-observe.js
+++ b/src/object-observe.js
@@ -63,7 +63,6 @@ if (IS_UNDEFINED(observationState.callbackInfoMap)) {
observationState.notifierObjectInfoMap = %ObservationWeakMapCreate();
observationState.pendingObservers = null;
observationState.nextCallbackPriority = 0;
- observationState.microtaskScheduled = false;
}
function ObservationWeakMap(map) {
@@ -395,7 +394,7 @@ function ObserverEnqueueIfActive(observer, objectInfo, changeRecord,
observationState.pendingObservers = nullProtoObject();
observationState.pendingObservers[callbackInfo.priority] = callback;
callbackInfo.push(changeRecord);
- EnqueueObserveMicrotask();
+ %SetMicrotaskPending(true);
}
function ObjectInfoEnqueueExternalChangeRecord(objectInfo, changeRecord, type) {
@@ -576,7 +575,6 @@ function ObjectDeliverChangeRecords(callback) {
}
function ObserveMicrotaskRunner() {
- observationState.microtaskScheduled = false;
var pendingObservers = observationState.pendingObservers;
if (pendingObservers) {
observationState.pendingObservers = null;
@@ -585,15 +583,7 @@ function ObserveMicrotaskRunner() {
}
}
}
-
-function EnqueueObserveMicrotask() {
- if (observationState.microtaskScheduled)
- return;
-
- RunMicrotasks.queue.push(ObserveMicrotaskRunner);
- %SetMicrotaskPending(true);
- observationState.microtaskScheduled = true;
-}
+RunMicrotasks.runners.push(ObserveMicrotaskRunner);
function SetupObjectObserve() {
%CheckIsBootstrapping();
« no previous file with comments | « no previous file | src/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698