Commit Graph

30 Commits

Author SHA1 Message Date
Carsten "Tomcat" Book
dc7e8b78ef merge mozilla-inbound to mozilla-central a=merge 2017-04-26 08:41:31 +02:00
Myk Melez
8e054c13ce Bug 1357897 - ensure __has_feature(thread_local) before using it on Mac; r=froydnj
Bug 1348419 enabled thread-local storage for Mac, but only Xcode 8+
supports that feature, which busted building with Xcode 7-.  This change
fixes that bustage by ensuring a Mac compiler supports the feature
before using it.
2017-04-25 15:23:26 -07:00
Sebastian Hengst
a66945203e Backed out changeset 9809ac55fe34 (bug 1357897) for build bustage at ThreadLocal.h:35:67. r=backout on a CLOSED TREE 2017-04-25 21:16:43 +02:00
Myk Melez
f583100a9b Bug 1357897 - ensure __has_feature(thread_local) before using it on Mac; r=froydnj
Bug 1348419 enabled thread-local storage for Mac, but only Xcode 8+
supports that feature, which busted building with Xcode 7-.  This change
fixes that bustage by ensuring a Mac compiler supports the feature
before using it.
2017-04-25 12:00:47 -07:00
Tom Tromey
779bb3d8df Bug 1349655 - remove sig_safe_t in favor of mozilla::Atomic<uint32_t>; r=djvj,njn
Remove the definition of sig_safe_t, which is only used by PseudoStack,
and replace the uses with mozilla::Atomic<uint32_t>.

MozReview-Commit-ID: GcPd9R94Vci
2017-03-22 13:57:31 -06:00
Tom Tromey
3919023c0f Bug 1348419 - Use thread_local on XP_WIN and XP_MACOSX; r=froydnj
MozReview-Commit-ID: 75dTUk27p94
2017-03-22 12:04:21 -06:00
Sebastian Hengst
eb5b23e4fe Backed out changeset e39e02b11392 (bug 1348419) for failing at jsutil.cpp(42) with "data with thread storage duration may not have dll interface". r=backout 2017-04-15 01:01:11 +02:00
Tom Tromey
a63f53a325 Bug 1348419 - Use thread_local on XP_WIN and XP_MACOSX; r=froydnj
MozReview-Commit-ID: 75dTUk27p94
2017-03-22 12:04:21 -06:00
Nicholas Nethercote
26b6e79d96 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX
2016-04-27 14:16:50 +10:00
Tom Tromey
2177f7ad7f Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07:00
Andrea Marchesini
3f93b1e1a5 Bug 1231378 - part 3 - Fix uninitialized members of classes in modules/libjar and mfbt, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book
39bb4e0359 Backed out changeset 138c4e6a9b45 (bug 1231378) 2016-01-12 15:48:55 +01:00
Andrea Marchesini
13fde80164 Bug 1231378 - part 3 - Fix uninitialized members of classes in modules/libjar and mfbt, r=smaug 2016-01-12 13:57:34 +00:00
Masatoshi Kimura
bae0a32948 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Tom Tromey
7860a37530 Bug 1093823 - Avoid valgrind report from ThreadLocal<bool>. r=froydnj 2014-11-07 08:41:00 -05:00
Nicholas Nethercote
e286b23cb3 Bug 1036789 - Convert the third quarter of MFBT to Gecko style. r=Ms2ger. 2014-07-10 19:10:17 -07:00
Bobby Holley
5bc22726c1 Bug 937317 - Implement basic script settings stack machinery. r=bz 2013-12-11 17:51:57 -08:00
Phil Ringnalda
52ab05db1f Back out 35371620801a:bf2019278b77 (bug 937317) for gaia-ui-test bustage and frequent timeouts in its own test 2013-12-07 11:08:56 -08:00
Bobby Holley
354639aafd Bug 937317 - Implement basic script settings stack machinery. r=bz 2013-12-06 12:01:41 -08:00
Carsten "Tomcat" Book
696f9891e3 Backed out changeset 004fa11e352a (bug 937317) WinXP Build Bustage on a CLOSED TREE 2013-12-06 08:42:40 +01:00
Bobby Holley
5d7d2926ca Bug 937317 - Implement basic script settings stack machinery. r=bz 2013-12-05 21:34:16 -08:00
Ehsan Akhgari
1ab9c7bcb4 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])
2013-07-18 13:59:53 -04:00
Birunthan Mohanathas
16c7cf35f3 Bug 784739 - Switch from NULL to nullptr in mfbt/. r=jwalden 2013-07-25 16:31:48 -07:00
Ryan VanderMeulen
e447db9f34 Backed out 3 changesets (bug 896124, bug 784739, bug 894026) for Windows checktest orange on a CLOSED TREE.
Backed out changeset 631b3d5d54f4 (bug 896124)
Backed out changeset 5e1dd28ede5d (bug 894026)
Backed out changeset c10c0a6270ec (bug 784739)
2013-07-26 00:08:51 -04:00
Birunthan Mohanathas
0ed1121a90 Bug 784739 - Switch from NULL to nullptr in mfbt/. r=jwalden 2013-07-25 16:31:48 -07:00
Ms2ger
d1c985e201 Bug 896341 - Update include guards and modelines in MFBT; r=Waldo 2013-07-24 09:41:39 +02:00
Jeff Walden
2a13d27ec3 Bug 756709 - Make ThreadLocal::set crash on failure (which really can only happen if per-thread memory for the TLS entry couldn't be allocated, which should be really rare). r=Ms2ger 2012-12-17 15:40:50 -05:00
Jeff Walden
9eafe3f278 Style patrol to make everything conform to mfbt/STYLE. No bug, r=sparky 2012-06-03 20:36:43 -07:00
Mike Hommey
9f8ab0ee6c Bug 756965 - Allow mozilla::ThreadLocal to store integer types smaller than, or as large as, a pointer. r=Waldo 2012-05-22 08:43:55 +02:00
Ehsan Akhgari
e1ba6751c1 Bug 753119 - Add ThreadLocal to mfbt - r=jwalden
... because nobody likes to use the NSPR TLS support.
2012-05-09 16:54:33 -04:00