bug 938025 - part 2 - fix some static constructors in the jseng r=waldo

This commit is contained in:
Trevor Saunders 2013-11-22 15:05:04 -05:00
Родитель fbfc3b3e45
Коммит 36e24ccdae
3 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -7,6 +7,7 @@
#ifndef js_RootingAPI_h
#define js_RootingAPI_h
#include "mozilla/Attributes.h"
#include "mozilla/GuardObjects.h"
#include "mozilla/LinkedList.h"
#include "mozilla/NullPtr.h"
@ -437,10 +438,9 @@ class MOZ_NONHEAP_CLASS Handle : public js::HandleBase<T>
* for the lifetime of the handle, as its users may not expect its value
* to change underneath them.
*/
static Handle fromMarkedLocation(const T *p) {
Handle h;
h.ptr = p;
return h;
static MOZ_CONSTEXPR Handle fromMarkedLocation(const T *p) {
return Handle(p, DeliberatelyChoosingThisOverload,
ImUsingThisOnlyInFromFromMarkedLocation);
}
/*
@ -482,6 +482,10 @@ class MOZ_NONHEAP_CLASS Handle : public js::HandleBase<T>
private:
Handle() {}
enum Disambiguator { DeliberatelyChoosingThisOverload = 42 };
enum CallerIdentity { ImUsingThisOnlyInFromFromMarkedLocation = 17 };
MOZ_CONSTEXPR Handle(const T *p, Disambiguator, CallerIdentity) : ptr(p) {}
const T *ptr;
template <typename S> void operator=(S) MOZ_DELETE;

Просмотреть файл

@ -216,7 +216,7 @@ struct IonOptions
baselineUsesBeforeCompile = 0;
}
IonOptions()
MOZ_CONSTEXPR IonOptions()
: gvn(true),
gvnIsOptimistic(true),
licm(true),

Просмотреть файл

@ -8,6 +8,7 @@
#define vm_ObjectImpl_h
#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
#include <stdint.h>
@ -833,7 +834,7 @@ class ObjectElements
}
public:
ObjectElements(uint32_t capacity, uint32_t length)
MOZ_CONSTEXPR ObjectElements(uint32_t capacity, uint32_t length)
: flags(0), initializedLength(0), capacity(capacity), length(length)
{}