JavaScript:SpiderMonkey:Coding Style: Difference between revisions

Jump to navigation Jump to search
Line 237: Line 237:
== #include paths ==
== #include paths ==


#include statements should use a fully-qualified (within SpiderMonkey) path, even if it's not necessary.  For example, this:
All #include statements should use a fully-qualified (within SpiderMonkey) path, even if it's not necessary.  For example, this:


   #include "vm/Stack.h"
   #include "vm/Stack.h"
Line 246: Line 246:


This keeps things consistent and helps with the ordering.
This keeps things consistent and helps with the ordering.
For headers in js/public/, the prefix is "js/", e.g.:
  #include "js/Vector.h"
For headers in mfbt/, the prefix is "mozilla/", e.g.:
  #include "mozilla/Assertions.h"


== #include ordering ==
== #include ordering ==
Confirmed users
1,345

edits

Navigation menu