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(); |