summaryrefslogtreecommitdiff
path: root/deps/v8/src/math.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/math.js')
-rw-r--r--deps/v8/src/math.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/deps/v8/src/math.js b/deps/v8/src/math.js
index 70b8c57cae..b5a6d18117 100644
--- a/deps/v8/src/math.js
+++ b/deps/v8/src/math.js
@@ -38,7 +38,7 @@ const $abs = MathAbs;
function MathConstructor() {}
%FunctionSetInstanceClassName(MathConstructor, 'Math');
const $Math = new MathConstructor();
-$Math.__proto__ = global.Object.prototype;
+$Math.__proto__ = $Object.prototype;
%SetProperty(global, "Math", $Math, DONT_ENUM);
// ECMA 262 - 15.8.2.1
@@ -195,8 +195,9 @@ function MathTan(x) {
// -------------------------------------------------------------------
-function SetupMath() {
- // Setup math constants.
+function SetUpMath() {
+ %CheckIsBootstrapping();
+ // Set up math constants.
// ECMA-262, section 15.8.1.1.
%OptimizeObjectForAddingMultipleProperties($Math, 8);
%SetProperty($Math,
@@ -236,7 +237,7 @@ function SetupMath() {
DONT_ENUM | DONT_DELETE | READ_ONLY);
%ToFastProperties($Math);
- // Setup non-enumerable functions of the Math object and
+ // Set up non-enumerable functions of the Math object and
// set their names.
InstallFunctionsOnHiddenPrototype($Math, DONT_ENUM, $Array(
"random", MathRandom,
@@ -258,7 +259,6 @@ function SetupMath() {
"max", MathMax,
"min", MathMin
));
-};
-
+}
-SetupMath();
+SetUpMath();