diff options
Diffstat (limited to 'js/src')
-rw-r--r-- | js/src/builtin/IntlTimeZoneData.h | 2 | ||||
-rw-r--r-- | js/src/jit/IonAnalysis.cpp | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | js/src/jsdate.cpp | 5 | ||||
-rw-r--r-- | js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js | 2 | ||||
-rw-r--r-- | js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js | 3 | ||||
-rw-r--r-- | js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js | 2 | ||||
-rw-r--r-- | js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js | 2 | ||||
-rw-r--r-- | js/src/vm/Shape.cpp | 8 | ||||
-rw-r--r-- | js/src/vm/StructuredClone.cpp | 7 |
9 files changed, 23 insertions, 14 deletions
diff --git a/js/src/builtin/IntlTimeZoneData.h b/js/src/builtin/IntlTimeZoneData.h index bb7d22109..f92c583df 100644 --- a/js/src/builtin/IntlTimeZoneData.h +++ b/js/src/builtin/IntlTimeZoneData.h @@ -1,5 +1,5 @@ // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017c +// tzdata version = 2018c #ifndef builtin_IntlTimeZoneData_h #define builtin_IntlTimeZoneData_h diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index 90303255d..2c9ffb607 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -2188,6 +2188,12 @@ IsRegExpHoistable(MIRGenerator* mir, MDefinition* regexp, MDefinitionVector& wor bool jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph) { + // If we are compiling try blocks, regular expressions may be observable + // from catch blocks (which Ion does not compile). For now just disable the + // pass in this case. + if (graph.hasTryBlock()) + return true; + MDefinitionVector worklist(graph.alloc()); for (ReversePostorderIterator block(graph.rpoBegin()); block != graph.rpoEnd(); block++) { diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp index d73fb93d2..ccaeda2a3 100644..100755 --- a/js/src/jsdate.cpp +++ b/js/src/jsdate.cpp @@ -1232,7 +1232,10 @@ date_parse(JSContext* cx, unsigned argc, Value* vp) static ClippedTime NowAsMillis() { - return TimeClip(static_cast<double>(PRMJ_Now()) / PRMJ_USEC_PER_MSEC); + const double maxResolutionMs = 2; + double timestamp = static_cast<double>(PRMJ_Now()) / PRMJ_USEC_PER_MSEC; + timestamp = floor(timestamp / maxResolutionMs) * maxResolutionMs; + return TimeClip(timestamp); } bool diff --git a/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js b/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js index aeb1fc043..890b1c1d5 100644 --- a/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js +++ b/js/src/tests/Intl/DateTimeFormat/timeZone_backward_links.js @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017c +// tzdata version = 2018c const tzMapper = [ x => x, diff --git a/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js b/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js index b9d957a82..19fd871eb 100644 --- a/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js +++ b/js/src/tests/Intl/DateTimeFormat/timeZone_backzone.js @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017c +// tzdata version = 2018c const tzMapper = [ x => x, @@ -47,7 +47,6 @@ const links = { "Africa/Nouakchott": "Africa/Nouakchott", "Africa/Ouagadougou": "Africa/Ouagadougou", "Africa/Porto-Novo": "Africa/Porto-Novo", - "Africa/Sao_Tome": "Africa/Sao_Tome", "Africa/Timbuktu": "Africa/Timbuktu", "America/Anguilla": "America/Anguilla", "America/Antigua": "America/Antigua", diff --git a/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js b/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js index 7a358e997..34425acec 100644 --- a/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js +++ b/js/src/tests/Intl/DateTimeFormat/timeZone_backzone_links.js @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017c +// tzdata version = 2018c const tzMapper = [ x => x, diff --git a/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js b/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js index 9515cb394..8b2dedec2 100644 --- a/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js +++ b/js/src/tests/Intl/DateTimeFormat/timeZone_notbackward_links.js @@ -1,7 +1,7 @@ // |reftest| skip-if(!this.hasOwnProperty("Intl")) // Generated by make_intl_data.py. DO NOT EDIT. -// tzdata version = 2017c +// tzdata version = 2018c const tzMapper = [ x => x, diff --git a/js/src/vm/Shape.cpp b/js/src/vm/Shape.cpp index a64dc529a..306a2c540 100644 --- a/js/src/vm/Shape.cpp +++ b/js/src/vm/Shape.cpp @@ -1214,6 +1214,10 @@ JSObject::setFlags(ExclusiveContext* cx, BaseShape::Flag flags, GenerateShape ge RootedObject self(cx, this); + Shape* existingShape = self->ensureShape(cx); + if (!existingShape) + return false; + if (isNative() && as<NativeObject>().inDictionaryMode()) { if (generateShape == GENERATE_SHAPE && !as<NativeObject>().generateOwnShape(cx)) return false; @@ -1227,10 +1231,6 @@ JSObject::setFlags(ExclusiveContext* cx, BaseShape::Flag flags, GenerateShape ge return true; } - Shape* existingShape = self->ensureShape(cx); - if (!existingShape) - return false; - Shape* newShape = Shape::setObjectFlags(cx, flags, self->taggedProto(), existingShape); if (!newShape) return false; diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp index 4b01cda85..3a062c3b8 100644 --- a/js/src/vm/StructuredClone.cpp +++ b/js/src/vm/StructuredClone.cpp @@ -2188,12 +2188,14 @@ JSStructuredCloneReader::readHeader() return in.reportTruncated(); if (tag != SCTAG_HEADER) { - // Old structured clone buffer. We must have read it from disk or - // somewhere, so we can assume it's scope-compatible. + // Old structured clone buffer. We must have read it from disk. + storedScope = JS::StructuredCloneScope::DifferentProcess; return true; } MOZ_ALWAYS_TRUE(in.readPair(&tag, &data)); + storedScope = JS::StructuredCloneScope(data); + if (data != uint32_t(JS::StructuredCloneScope::SameProcessSameThread) && data != uint32_t(JS::StructuredCloneScope::SameProcessDifferentThread) && data != uint32_t(JS::StructuredCloneScope::DifferentProcess)) @@ -2202,7 +2204,6 @@ JSStructuredCloneReader::readHeader() "invalid structured clone scope"); return false; } - storedScope = JS::StructuredCloneScope(data); if (storedScope < allowedScope) { JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA, "incompatible structured clone scope"); |