Bug 1570370 - Part 5: Rename NativeLocale.cpp to Locale.cpp. r=jwalden
authorAndré Bargull <andre.bargull@gmail.com>
Fri, 11 Oct 2019 19:25:12 +0000
changeset 497318 f22fdbd968ed04fedd47c406db2678fa5ae1205e
parent 497317 22ff988b77c6218bd6556702bb926898869b7ecb
child 497319 7e272f3c9fa48620151dbdd970802be7d3c0271e
push id36682
push userncsoregi@mozilla.com
push dateSat, 12 Oct 2019 09:52:03 +0000
treeherdermozilla-central@06ea2371f897 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwalden
bugs1570370
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1570370 - Part 5: Rename NativeLocale.cpp to Locale.cpp. r=jwalden Differential Revision: https://phabricator.services.mozilla.com/D40071
js/src/builtin/intl/Locale.cpp
js/src/builtin/intl/NativeLocale.cpp
js/src/moz.build
rename from js/src/builtin/intl/NativeLocale.cpp
rename to js/src/builtin/intl/Locale.cpp
--- a/js/src/builtin/intl/NativeLocale.cpp
+++ b/js/src/builtin/intl/Locale.cpp
@@ -1,16 +1,18 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=8 sts=2 et sw=2 tw=80:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* Intl.Locale implementation. */
 
+#include "builtin/intl/Locale.h"
+
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Casting.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Range.h"
 #include "mozilla/TextUtils.h"
 
 #include <algorithm>
@@ -19,17 +21,16 @@
 #include <string.h>
 #include <utility>
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 
 #include "builtin/intl/CommonFunctions.h"
 #include "builtin/intl/LanguageTag.h"
-#include "builtin/intl/Locale.h"
 #include "gc/Rooting.h"
 #include "js/Conversions.h"
 #include "js/TypeDecls.h"
 #include "js/Wrapper.h"
 #include "util/StringBuffer.h"
 #include "vm/GlobalObject.h"
 #include "vm/JSContext.h"
 #include "vm/StringType.h"
@@ -38,17 +39,17 @@
 #include "vm/NativeObject-inl.h"
 
 using namespace js;
 using namespace js::intl::LanguageTagLimits;
 
 using intl::LanguageTag;
 using intl::LanguageTagParser;
 
-const JSClass NativeLocaleObject::class_ = {
+const JSClass LocaleObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(LocaleObject::SLOT_COUNT),
 };
 
 static inline bool IsLocale(HandleValue v) {
   return v.isObject() && v.toObject().is<LocaleObject>();
 }
 
@@ -91,17 +92,17 @@ static mozilla::Maybe<IndexAndLength> Un
 
     // Add +1 to skip over the preceding separator.
     index += 1 + extensionLength;
   }
   return mozilla::Nothing();
 }
 
 static LocaleObject* CreateLocaleObject(JSContext* cx, HandleObject prototype,
-                                                    const LanguageTag& tag) {
+                                        const LanguageTag& tag) {
   RootedObject proto(cx, prototype);
   if (!proto) {
     proto = GlobalObject::getOrCreateLocalePrototype(cx, cx->global());
     if (!proto) {
       return nullptr;
     }
   }
 
@@ -1221,17 +1222,17 @@ static const JSPropertySpec locale_prope
     JS_PSG("numberingSystem", Locale_numberingSystem, 0),
     JS_PSG("language", Locale_language, 0),
     JS_PSG("script", Locale_script, 0),
     JS_PSG("region", Locale_region, 0),
     JS_STRING_SYM_PS(toStringTag, "Intl.Locale", JSPROP_READONLY),
     JS_PS_END};
 
 JSObject* js::CreateLocalePrototype(JSContext* cx, HandleObject Intl,
-                                          Handle<GlobalObject*> global) {
+                                    Handle<GlobalObject*> global) {
   RootedFunction ctor(
       cx, GlobalObject::createConstructor(cx, &Locale, cx->names().Locale, 1));
   if (!ctor) {
     return nullptr;
   }
 
   RootedObject proto(
       cx, GlobalObject::createBlankPrototype<PlainObject>(cx, global));
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -377,17 +377,17 @@ SOURCES += [
 if CONFIG['ENABLE_INTL_API']:
     UNIFIED_SOURCES += [
         'builtin/intl/Collator.cpp',
         'builtin/intl/CommonFunctions.cpp',
         'builtin/intl/DateTimeFormat.cpp',
         'builtin/intl/IntlObject.cpp',
         'builtin/intl/LanguageTag.cpp',
         'builtin/intl/LanguageTagGenerated.cpp',
-        'builtin/intl/NativeLocale.cpp',
+        'builtin/intl/Locale.cpp',
         'builtin/intl/NumberFormat.cpp',
         'builtin/intl/PluralRules.cpp',
         'builtin/intl/RelativeTimeFormat.cpp',
         'builtin/intl/SharedIntlData.cpp',
         'builtin/intl/UnicodeExtensionsGenerated.cpp',
     ]
 
 if CONFIG['MOZ_INSTRUMENTS']: