Bug 879831, part 2 - Move JSObject::asModule from Module.h to jsobjinlines.h since it requires another inline function defined in that header. r=njn.
authorJason Orendorff <jorendorff@mozilla.com>
Thu, 06 Jun 2013 22:48:00 -0500
changeset 134332 09f13d1498ee942ede52cac09826c43fccf9e6cc
parent 134331 e6ca293b6980fd6f3e96d3331906268cbf988015
child 134333 2f5b1bd1ca458cd69c8311eaad3847fc7bffdeb9
push id24791
push userryanvm@gmail.com
push dateFri, 07 Jun 2013 15:11:44 +0000
treeherdermozilla-central@6f32011a27ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs879831
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 879831, part 2 - Move JSObject::asModule from Module.h to jsobjinlines.h since it requires another inline function defined in that header. r=njn.
js/src/builtin/Module.h
js/src/jsobjinlines.h
--- a/js/src/builtin/Module.h
+++ b/js/src/builtin/Module.h
@@ -28,16 +28,9 @@ class Module : public JSObject {
     inline void setScript(JSScript *script);
 
     static const uint32_t ATOM_SLOT = 0;
     static const uint32_t SCRIPT_SLOT = 1;
 };
 
 } // namespace js
 
-inline js::Module &
-JSObject::asModule()
-{
-    JS_ASSERT(isModule());
-    return *static_cast<js::Module *>(this);
-}
-
 #endif // Module_h___
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -18,16 +18,17 @@
 #include "jsobj.h"
 #include "jsprobes.h"
 #include "jspropertytree.h"
 #include "jsproxy.h"
 #include "jsstr.h"
 #include "jstypedarray.h"
 #include "jswrapper.h"
 
+#include "builtin/Module.h"
 #include "gc/Barrier.h"
 #include "gc/Marking.h"
 #include "js/MemoryMetrics.h"
 #include "js/RootingAPI.h"
 #include "js/TemplateLib.h"
 #include "vm/BooleanObject.h"
 #include "vm/GlobalObject.h"
 #include "vm/Shape.h"
@@ -923,16 +924,23 @@ JSObject::asString()
 
 inline js::ScriptSourceObject &
 JSObject::asScriptSource()
 {
     JS_ASSERT(isScriptSource());
     return *static_cast<js::ScriptSourceObject *>(this);
 }
 
+inline js::Module &
+JSObject::asModule()
+{
+    JS_ASSERT(isModule());
+    return *static_cast<js::Module *>(this);
+}
+
 inline bool
 JSObject::isDebugScope() const
 {
     extern bool js_IsDebugScopeSlow(JSObject *obj);
     return getClass() == &js::ObjectProxyClass && js_IsDebugScopeSlow(const_cast<JSObject*>(this));
 }
 
 /* static */ inline JSObject *