[esnext] use variadic arguments for Object.fromEntries

This makes the deoptimizer happy, and is more consistent with other
Torque JS functions.

BUG=chromium:912504, v8:8021
R=tebbi@chromium.org, danno@chromium.org, mvstanton@chromium.org, gsathya@chromium.org

Change-Id: I4c86db9549c367dfab7f76b49a0cf3c69d3ec50b
Reviewed-on: https://chromium-review.googlesource.com/c/1366397
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58161}
diff --git a/src/builtins/object-fromentries.tq b/src/builtins/object-fromentries.tq
index 93f4871..a04b034 100644
--- a/src/builtins/object-fromentries.tq
+++ b/src/builtins/object-fromentries.tq
@@ -33,8 +33,9 @@
   }
 
   transitioning javascript builtin
-  ObjectFromEntries(implicit context: Context)(receiver: Object): Object {
-    const iterable: Object = receiver;
+  ObjectFromEntries(implicit context: Context)(receiver: Object, ...arguments):
+      Object {
+    const iterable: Object = arguments[0];
     try {
       if (IsNullOrUndefined(iterable)) goto Throw;
       return ObjectFromEntriesFastCase(iterable) otherwise IfSlow;
diff --git a/test/mjsunit/harmony/regress/regress-912504.js b/test/mjsunit/harmony/regress/regress-912504.js
new file mode 100644
index 0000000..78b1992
--- /dev/null
+++ b/test/mjsunit/harmony/regress/regress-912504.js
@@ -0,0 +1,11 @@
+// Copyright 2018 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --always-opt --harmony-object-from-entries --allow-natives-syntax
+
+function test() {
+  Object.fromEntries([[]]);
+  %DeoptimizeNow();
+}
+test();