Bug 898263 (part 9) - Move IdValuePair from jsprvtd.h to ds/IdValuePair.h. r=jorendorff.

--HG--
extra : rebase_source : 9db6c27bad5a5ce742aa2ad4fea3427696273838
This commit is contained in:
Nicholas Nethercote 2013-07-25 23:42:47 -07:00
parent ae1367626f
commit 661b2847d3
4 changed files with 29 additions and 11 deletions

27
js/src/ds/IdValuePair.h Normal file
View File

@ -0,0 +1,27 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
* vim: set ts=8 sts=4 et sw=4 tw=99:
* 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 ds_IdValuePair_h
#define ds_IdValuePair_h
#include "jsapi.h"
namespace js {
struct IdValuePair
{
jsid id;
Value value;
IdValuePair() {}
IdValuePair(jsid idArg)
: id(idArg), value(UndefinedValue())
{}
};
} /* namespace js */
#endif /* ds_IdValuePair_h */

View File

@ -16,6 +16,7 @@
#include "jsprvtd.h"
#include "ds/LifoAlloc.h"
#include "ds/IdValuePair.h"
#include "gc/Barrier.h"
#include "gc/Heap.h"
#include "js/HashTable.h"

View File

@ -11,6 +11,7 @@
#include "jsapi.h"
#include "ds/IdValuePair.h"
#include "vm/String.h"
namespace js {

View File

@ -29,17 +29,6 @@ enum XDRMode {
XDR_DECODE
};
struct IdValuePair
{
jsid id;
Value value;
IdValuePair() {}
IdValuePair(jsid idArg)
: id(idArg), value(UndefinedValue())
{}
};
} /* namespace js */
#endif /* jsprvtd_h */