LCOV - code coverage report
Current view: top level - js/src/ds - IdValuePair.h (source / functions) Hit Total Coverage
Test: output.info Lines: 9 13 69.2 %
Date: 2017-07-14 16:53:18 Functions: 3 4 75.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
       2             :  * vim: set ts=8 sts=4 et sw=4 tw=99:
       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 ds_IdValuePair_h
       8             : #define ds_IdValuePair_h
       9             : 
      10             : #include "jsapi.h"
      11             : 
      12             : #include "NamespaceImports.h"
      13             : #include "gc/Tracer.h"
      14             : #include "js/GCVector.h"
      15             : #include "js/Id.h"
      16             : 
      17             : namespace js {
      18             : 
      19             : struct IdValuePair
      20             : {
      21             :     Value value;
      22             :     jsid id;
      23             : 
      24        6191 :     IdValuePair()
      25        6191 :       : value(UndefinedValue()), id(JSID_EMPTY)
      26        6191 :     {}
      27         226 :     explicit IdValuePair(jsid idArg)
      28         226 :       : value(UndefinedValue()), id(idArg)
      29         226 :     {}
      30        2664 :     IdValuePair(jsid idArg, const Value& valueArg)
      31        2664 :       : value(valueArg), id(idArg)
      32        2664 :     {}
      33             : 
      34           0 :     void trace(JSTracer* trc) {
      35           0 :         TraceRoot(trc, &value, "IdValuePair::value");
      36           0 :         TraceRoot(trc, &id, "IdValuePair::id");
      37           0 :     }
      38             : };
      39             : 
      40             : using IdValueVector = JS::GCVector<IdValuePair>;
      41             : 
      42             : } /* namespace js */
      43             : 
      44             : #endif /* ds_IdValuePair_h */

Generated by: LCOV version 1.13