7 #include "src/heap/heap.h" 8 #include "src/objects-inl.h" 9 #include "src/snapshot/natives.h" 14 NativesExternalStringResource::NativesExternalStringResource(NativeType type,
16 : type_(type), index_(index) {
17 Vector<const char> source;
21 DCHECK(index < Natives::GetBuiltinsCount());
22 source = Natives::GetScriptSource(index);
25 DCHECK(index < ExtraNatives::GetBuiltinsCount());
26 source = ExtraNatives::GetScriptSource(index);
28 case EXPERIMENTAL_EXTRAS:
29 DCHECK(index < ExperimentalExtraNatives::GetBuiltinsCount());
30 source = ExperimentalExtraNatives::GetScriptSource(index);
35 data_ = source.start();
36 length_ = source.length();