From e3e1be66dbd37020d6e52666e4d4639aac7859ef Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 4 May 2018 22:02:48 +0200 Subject: [PATCH] Make InitRuntimeNumberState's return type reflect its infallible nature. --- js/src/jsnum.cpp | 6 +----- js/src/jsnum.h | 3 +-- js/src/vm/Runtime.cpp | 3 +-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/js/src/jsnum.cpp b/js/src/jsnum.cpp index 98d0459872..28ed151598 100644 --- a/js/src/jsnum.cpp +++ b/js/src/jsnum.cpp @@ -991,14 +991,10 @@ js::FIX_FPU() #endif } -bool +void js::InitRuntimeNumberState(JSRuntime* rt) { FIX_FPU(); - - // XXX EXPOSE_INTL_API has become true all the time, meaning this is - // no longer fallible, and we should change its return type. - return true; } JSObject* diff --git a/js/src/jsnum.h b/js/src/jsnum.h index 2e70498884..8dff45f692 100644 --- a/js/src/jsnum.h +++ b/js/src/jsnum.h @@ -34,8 +34,7 @@ namespace js { class StringBuffer; -extern MOZ_MUST_USE bool -InitRuntimeNumberState(JSRuntime* rt); +void InitRuntimeNumberState(JSRuntime* rt); /* Initialize the Number class, returning its prototype object. */ extern JSObject* diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 0e7ce7f107..174e235942 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -325,8 +325,7 @@ JSRuntime::init(uint32_t maxbytes, uint32_t maxNurseryBytes) /* The garbage collector depends on everything before this point being initialized. */ gcInitialized = true; - if (!InitRuntimeNumberState(this)) - return false; + InitRuntimeNumberState(this); JS::ResetTimeZone();