LCOV - code coverage report
Current view: top level - src/snapshot - natives-common.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 8 8 100.0 %
Date: 2019-04-17 Functions: 2 2 100.0 %

          Line data    Source code
       1             : // Copyright 2015 the V8 project authors. All rights reserved.
       2             : // Use of this source code is governed by a BSD-style license that can be
       3             : // found in the LICENSE file.
       4             : 
       5             : // The common functionality when building with internal or external natives.
       6             : 
       7             : #include "src/heap/heap.h"
       8             : #include "src/objects-inl.h"
       9             : #include "src/snapshot/natives.h"
      10             : 
      11             : namespace v8 {
      12             : namespace internal {
      13             : 
      14       62435 : NativesExternalStringResource::NativesExternalStringResource(NativeType type,
      15             :                                                              int index)
      16       62435 :     : type_(type), index_(index) {
      17             :   Vector<const char> source;
      18             :   DCHECK_LE(0, index);
      19       62435 :   CHECK_EQ(EXTRAS, type_);
      20             :   DCHECK(index < ExtraNatives::GetBuiltinsCount());
      21       62435 :   source = ExtraNatives::GetScriptSource(index);
      22       62435 :   data_ = source.start();
      23       62435 :   length_ = source.length();
      24       62435 : }
      25             : 
      26             : }  // namespace internal
      27      122004 : }  // namespace v8

Generated by: LCOV version 1.10