Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 3948eec3a722461b50bfdc241322fedb837f6060..7f2eae35ddd4cbc59dc307059e78b5bf65bd0a1a 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -927,6 +927,9 @@ Handle<JSPromise> Factory::NewJSPromise() { |
Handle<JSPromise> promise = Handle<JSPromise>::cast(promise_obj); |
promise->set_status(v8::Promise::kPending); |
promise->set_flags(0); |
+ for (int i = 0; i < v8::Promise::kEmbedderFieldCount; i++) { |
+ promise->SetEmbedderField(i, Smi::kZero); |
+ } |
isolate()->RunPromiseHook(PromiseHookType::kInit, promise, undefined_value()); |
return promise; |