Bug 642381, part 3: Hoist Maybe into mfbt and eliminate Gecko's use of jstl. r=jorendorff,luke

This commit is contained in:
Chris Jones
2011-04-28 17:48:52 -05:00
parent 0ca94e5bf8
commit e870e569fc
8 changed files with 270 additions and 139 deletions

View File

@@ -40,7 +40,6 @@
#include "jscntxt.h"
#include "jsapi.h"
#include "jstl.h"
#include "jshashtable.h"
#include "mozilla/jetpack/JetpackActorCommon.h"
@@ -51,15 +50,7 @@
#include "nsJSUtils.h"
using mozilla::jetpack::JetpackActorCommon;
using mozilla::jetpack::PHandleParent;
using mozilla::jetpack::HandleParent;
using mozilla::jetpack::PHandleChild;
using mozilla::jetpack::HandleChild;
using mozilla::jetpack::KeyValue;
using mozilla::jetpack::PrimVariant;
using mozilla::jetpack::CompVariant;
using mozilla::jetpack::Variant;
using namespace mozilla::jetpack;
class JetpackActorCommon::OpaqueSeenType
{
@@ -176,7 +167,7 @@ JetpackActorCommon::jsval_to_CompVariant(JSContext* cx, JSType type, jsval from,
if (type != JSTYPE_OBJECT)
return false;
js::Maybe<OpaqueSeenType> lost;
Maybe<OpaqueSeenType> lost;
if (!seen) {
lost.construct();
seen = lost.addr();
@@ -337,7 +328,7 @@ JetpackActorCommon::jsval_from_CompVariant(JSContext* cx,
jsval* to,
OpaqueSeenType* seen)
{
js::Maybe<OpaqueSeenType> lost;
Maybe<OpaqueSeenType> lost;
if (!seen) {
lost.construct();
seen = lost.addr();