Bug 1289923 - Fix the minor errors found while writing test262 tests for DateTimeFormat.prototype.formatToParts. r=Waldo
authorZibi Braniecki <gandalf@mozilla.com>
Thu, 28 Jul 2016 16:01:00 -0400
changeset 347227 23fd4759f733c724c14f3533b25cf8dad3309296
parent 347226 ab6dd1b9f840b104523fb5c777ca4d728fd31728
child 347228 c2211a92bce2048fb6b541a85fd306225d4f32f3
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs1289923
milestone50.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 1289923 - Fix the minor errors found while writing test262 tests for DateTimeFormat.prototype.formatToParts. r=Waldo
js/src/builtin/Intl.cpp
--- a/js/src/builtin/Intl.cpp
+++ b/js/src/builtin/Intl.cpp
@@ -1787,18 +1787,21 @@ InitDateTimeFormatClass(JSContext* cx, H
     {
         return nullptr;
     }
 
     // If the still-experimental DateTimeFormat.prototype.formatToParts method
     // is enabled, also add it.
     if (cx->compartment()->creationOptions().experimentalDateTimeFormatFormatToPartsEnabled()) {
         RootedValue ftp(cx);
-        if (!GlobalObject::getIntrinsicValue(cx, cx->global(),
-                                             cx->names().DateTimeFormatFormatToParts, &ftp))
+        HandlePropertyName name = cx->names().formatToParts;
+        if (!GlobalObject::getSelfHostedFunction(cx, cx->global(),
+                    cx->names().DateTimeFormatFormatToParts,
+                    name,
+                    0, &ftp))
         {
             return nullptr;
         }
 
         if (!DefineProperty(cx, proto, cx->names().formatToParts, ftp, nullptr, nullptr, 0))
             return nullptr;
     }