Commit Graph

201 Commits

Author SHA1 Message Date
Nicholas Nethercote
72a5b37f69 Bug 902820 - Fix a bunch of compile warnings in SpiderMonkey. r=till. 2013-08-08 06:33:49 -07:00
Jon Coppeard
81e61ea97c Bug 899976 - GC: Fix unsafe references related to ToInt* functions - js engine changes r=sfink 2013-08-02 13:15:38 +01: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
Terrence Cole
dda068b13b Bug 887563 - Convert CallArgs::operator[] to return a Handle; r=Waldo,bz 2013-06-26 16:26:45 -07:00
Jon Coppeard
3c2d7ecdda Bug 891966 - 2 - Comment calls to Handle::fromMarkedLocation r=bz 2013-07-23 10:58:28 +01:00
Jon Coppeard
ae0f348be2 Bug 891966 - 1 - Don't allow construction of Handle<T> from Heap<T> r=bz 2013-07-23 10:58:27 +01:00
Jon Coppeard
d955a55606 Bug 888338 - 1 - Add TenuredHeap<T> class r=terrence r=bz 2013-07-23 10:58:26 +01:00
Jeff Walden
e46d68d489 Bug 891177 - Remove Vector.h's js/TemplateLib.h dependency by introducing mfbt/TemplateLib.h with the necessary bits. r=terrence 2013-07-08 12:42:13 -07:00
Brian Hackett
d5a61ab0f3 Bug 885758 - Add ExclusiveContext for use by threads with exclusive access to their compartment, r=billm. 2013-07-10 09:29:52 -06:00
Jon Coppeard
77fee72ad4 Bug 878160 - GC: post barrier weak references in the browser - part 1 JS engine r=terrence 2013-07-02 09:43:45 +01:00
Justin Lebar
1c2d2a3d9e Bug 820686 - Follow-up: s/MOZ_ASSUME_NOT_REACHED/MOZ_ASSUME_UNREACHABLE/. rs=waldo
I'd meant to do this, but I only got as far as the comment in mfbt.  Oops!
2013-06-28 19:20:12 -07:00
Justin Lebar
8cc88f21ce Bug 820686 - Remove code after MOZ_CRASH or MOZ_ASSUME_NOT_REACHED. r=(see below)
r=tbsaunde for accessible
r=jmuizelaar for gfx
r=waldo for js
r=roc for layout
r=glandium for mozglue
r=jduell for netwerk
r=khuey for everything else
2013-06-28 18:38:32 -07:00
Justin Lebar
b9c3f2857f Bug 820686 - Rename MOZ_NOT_REACHED() and JS_NOT_REACHED() to MOZ_ASSUME_NOT_REACHED(). r=waldo
This includes a mechanical renaming of MOZ_NOT_REACHED to MOZ_ASSUME_NOT_REACHED in JS.  Later patches in this queue clean up whitespace errors and so on.
2013-06-28 18:38:31 -07:00
Steve Fink
a19b18ad5d Bug 887362 - Fix include tangle for CheckStackRoots, r=ehoogeveen 2013-06-26 11:21:36 -07:00
Terrence Cole
c37a5776ac Bug 848592 - Fix some dynamic rooting analysis failures; r=sfink 2013-06-14 13:48:39 -07:00
Steve Fink
c302bf3968 Bug 868302 - Enable rooting LIFO assertions in DEBUG, r=terrence 2013-05-03 13:53:15 -07:00
Jon Coppeard
339391c0e4 Bug 885315 - GC: Add some documentation comments for JS::Heap<T> r=sfink 2013-06-21 14:12:45 +01:00
Terrence Cole
a62e9344f4 Backout ac48416672e7 for unexpected SM(r) failures.
Even if the there is a CLOSED TREE by the time I push.
2013-06-20 16:17:37 -07:00
Terrence Cole
9fb1932a85 Bug 848592 - Fix some dynamic rooting analysis failures; r=sfink 2013-06-14 13:48:39 -07:00
Bobby Holley
c85022525d Bug 883450 - Assert that we're in a request whenever we create a Rooted<T>. r=terrence 2013-06-20 11:05:34 -07:00
Emanuel Hoogeveen
7618e9b9a6 Bug 883697 (part 1) - Make include guards consistent in js/ductwork/, js/ipc/ and js/public/. r=njn. 2013-06-19 17:59:09 -07:00
Jon Coppeard
36fbe0a5b6 Bug 884283 - GC: Rename RootMethods to GCMethods r=terrence 2013-06-19 11:32:26 +01:00
Jon Coppeard
131c1edc52 Bug 877762 - GC: Post-barrier cycle collector participants - 1 Fixes and updates to JS::Heap<T> r=terrence 2013-06-18 11:00:37 +01:00
Terrence Cole
699ed75170 No Bug - Assert that our Rooting ABI is correct; r=sfink 2013-06-13 15:14:44 -07:00
Bill McCloskey
c7a0a9f13c Bug 880697 - Add JSRuntime constructor for Rooted. r=terrence 2013-06-12 14:17:54 -07:00
Boris Zbarsky
773ccd711e Bug 877281 part 5. Add a set() method to Rooted. r=terrence 2013-06-07 22:45:45 -04:00
Joshua Cranmer
6bf22b7411 Bug 868285 - Fix static checking builds, part 2: Add MOZ_NONHEAP_CLASS. r=ehsan 2013-05-27 16:05:02 -05:00
Jon Coppeard
e77125c8a7 Bug 875872 - Add public Heap<T> class for implementing post-barriers in the browser r=terrence 2013-05-27 12:51:25 +01:00
Boris Zbarsky
a954b5ecbd Bug 875939. Make passing a Rooted<T> or Handle<T> to a function taking |const T&| not be a gc hazard. r=terrence 2013-05-24 22:38:09 -04:00
Eddy Bruel
8884fe0a53 Bug 637572 - Implement ScriptSourceObject; r=jimb 2013-05-22 16:06:54 -07:00
Boris Zbarsky
429be792e2 Bug 868715 part 10. Create specializations of Optional for 'any' and 'object' types so that we can have those look like Optional<Handle<Value> > and Optional<Handle<JSObject*> > respectively. r=peterv,sfink 2013-05-16 12:36:56 -04:00
Terrence Cole
e9aa96855d Bug 867426 - Remove the ForwardDeclare MACROs; r=jonco 2013-04-30 15:41:20 -07:00
Terrence Cole
2c87cd700d Bug 867426 - Remove RawObject typedef; r=jonco 2013-04-30 15:41:12 -07:00
Terrence Cole
f892dcb61f Bug 867426 - Remove RawId typedef; r=jonco 2013-04-30 15:41:04 -07:00
Terrence Cole
9864e6393e Bug 867426 - Remove RawValue typedef; r=jonco 2013-04-30 15:40:56 -07:00
Terrence Cole
0e337e93f7 Bug 867426 - Remove RawString typedef; r=jonco 2013-04-30 15:40:48 -07:00
Terrence Cole
9349f5a40d Bug 867426 - Remove RawScript typedef; r=jonco 2013-04-30 15:40:40 -07:00
Terrence Cole
9536f7d886 Bug 867426 - Remove RawFunction typedef; r=jonco 2013-04-30 15:40:29 -07:00
Steve Fink
27aad72453 No bug, DONTBUILD. Comment fix. 2013-04-27 12:27:53 -07:00
Jon Coppeard
d85508d89a Bug 864848 - Mark Rooted<> as stack only r=terrence 2013-04-25 11:55:30 +01:00
Sean Stangl
4c46a9aa7c Bug 860029 - Standardize Modelines in the JS Module. r=njn 2013-04-16 13:47:10 -07:00
Phil Ringnalda
4f94bac4a1 Back out a5a1dd3bd8ae (bug 860029) for stupidorange 2013-04-15 12:55:38 -07:00
Sean Stangl
9596836ecf Bug 860029 - Standardize Modelines in the JS Module. r=njn 2013-04-15 11:33:03 -07:00
Jon Coppeard
eebb4fb1cd Bug 860704 - GC: Comment says RawT converts to RootedT r=terrence 2013-04-12 09:31:43 +01:00
Phil Ringnalda
978110175c Back out 5bf9771e1a28 (bug 860029) for bustage
CLOSED TREE
2013-04-11 19:55:37 -07:00
Sean Stangl
999eb7bab9 Bug 860029 - Standardize Modelines in the JS Module. DONTBUILD. r=njn 2013-04-11 18:48:59 -07:00
Jeff Walden
0ced4a90d6 Bug 851237 - Replace StaticAssert uses with MOZ_STATIC_ASSERT. r=dholbert 2013-03-21 18:26:15 -07:00
Jon Coppeard
7fd237aed2 Bug 781070 - make NullPtr public r=terrence 2013-03-20 10:41:20 +00:00
Jon Coppeard
f337f50444 Bug 848754 - GC: Remove relaxed root checking infrastructure r=terrence 2013-03-08 08:54:59 +00:00
Jon Coppeard
22aae16f6f Bug 849273 - Investigate splitting the js and JS namespaces r=terrence 2013-03-19 10:35:41 +00:00