JavaScript:SpiderMonkey:C++ Coding Style: Difference between revisions

Jump to navigation Jump to search
Line 42: Line 42:
     p->doWhateverSpiderPigDoes();
     p->doWhateverSpiderPigDoes();
  }
  }
Conditions with multi-line tests should put the brace on the new line.
  types::TypeSet *types = frame.extra(lhs).types;
  if (JSOp(*PC) == JSOP_SETPROP && id == types::MakeTypeId(cx, id) &&
      types && !types->unknownObject() &&
      types->getObjectCount() == 1 &&
      types->getTypeObject(0) != NULL &&
      !types->getTypeObject(0)->unknownProperties())
  {
      JS_ASSERT(usePropCache);
      types::TypeObject *object = types->getTypeObject(0);
      types::TypeSet *propertyTypes = object->getProperty(cx, id, false);
      ...
  } else {
      ...
  }


== Namespaces ==
== Namespaces ==
29

edits

Navigation menu