Commit 433fd361 authored by Benjamin Smedberg's avatar Benjamin Smedberg
Browse files

Bug 737164 prerequisite - move mozilla::fallible_t to its own header so that...

Bug 737164 prerequisite - move mozilla::fallible_t to its own header so that everyone can reference it reasonable, r=cjones

--HG--
extra : rebase_source : 1f0e042f6d639b960c85f7813346e82afcf27861
parent c16b458b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ endif

EXPORTS_NAMESPACES 	= mozilla
EXPORTS_mozilla 	=			\
	fallible.h				\
	mozalloc.h		 		\
	mozalloc_abort.h			\
	mozalloc_macro_wrappers.h 		\
+14 −0
Original line number Diff line number Diff line
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_fallible_h
#define mozilla_fallible_h

namespace mozilla {

struct fallible_t { };

} // namespace mozilla

#endif // mozilla_fallible_h
+4 −6
Original line number Diff line number Diff line
@@ -52,6 +52,10 @@
#endif
#include "xpcom-config.h"

#if defined(__cplusplus)
#include "mozilla/fallible.h"
#endif

#define MOZALLOC_HAVE_XMALLOC

#if defined(MOZALLOC_EXPORT)
@@ -291,12 +295,6 @@ void operator delete[](void* ptr, const std::nothrow_t&) MOZALLOC_THROW_IF_HAS_E
 *   (4) the matching system |operator delete(void*) throw(std::bad_alloc)|
 */

namespace mozilla {

struct MOZALLOC_EXPORT fallible_t { };

} /* namespace mozilla */

MOZALLOC_INLINE
void* operator new(size_t size, const mozilla::fallible_t&) MOZALLOC_THROW_IF_HAS_EXCEPTIONS
{