1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2  * vim: set ts=8 sts=2 et sw=2 tw=80:
3  * This Source Code Form is subject to the terms of the Mozilla Public
4  * License, v. 2.0. If a copy of the MPL was not distributed with this
5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 
7 #ifndef builtin_RecordObject_h
8 #define builtin_RecordObject_h
9 
10 #include "vm/JSObject.h"
11 #include "vm/NativeObject.h"
12 #include "vm/RecordType.h"
13 
14 namespace js {
15 
16 class RecordObject : public NativeObject {
17   enum { PrimitiveValueSlot, SlotCount };
18 
19  public:
20   static const JSClass class_;
21 
22   static RecordObject* create(JSContext* cx, Handle<RecordType*> record);
23 
24   JS::RecordType* unbox() const;
25 
26   static bool maybeUnbox(JSObject* obj, MutableHandle<RecordType*> rrec);
27 };
28 
29 }  // namespace js
30 
31 #endif
32