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

Unified Diff: src/v8.cc

Issue 64223010: Harmony promises (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: TODO addressing Elliott's comment Created 7 years, 1 month 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
« src/promise.js ('K') | « src/runtime.cc ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8.cc
diff --git a/src/v8.cc b/src/v8.cc
index c35230d053b4866bffc16797ae650a68ea5b6110..c104004cc948f17fe4dcceaaac4ce330347b1510 100644
--- a/src/v8.cc
+++ b/src/v8.cc
@@ -151,17 +151,15 @@ void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) {
void V8::FireCallCompletedCallback(Isolate* isolate) {
bool has_call_completed_callbacks = call_completed_callbacks_ != NULL;
- bool observer_delivery_pending =
- FLAG_harmony_observation && isolate->observer_delivery_pending();
- if (!has_call_completed_callbacks && !observer_delivery_pending) return;
+ bool microtasks_pending = isolate->microtasks_pending();
+ if (!has_call_completed_callbacks && !microtasks_pending) return;
+
HandleScopeImplementer* handle_scope_implementer =
isolate->handle_scope_implementer();
if (!handle_scope_implementer->CallDepthIsZero()) return;
// Fire callbacks. Increase call depth to prevent recursive callbacks.
handle_scope_implementer->IncrementCallDepth();
- if (observer_delivery_pending) {
- JSObject::DeliverChangeRecords(isolate);
- }
+ if (microtasks_pending) Execution::RunMicrotasks(isolate);
if (has_call_completed_callbacks) {
for (int i = 0; i < call_completed_callbacks_->length(); i++) {
call_completed_callbacks_->at(i)();
« src/promise.js ('K') | « src/runtime.cc ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698