Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 56302b42665a971ce0e8ec50608f759627e95656..31a771fbeb0a00f10b265ca0ddaa7227a105a361 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -76,22 +76,15 @@ Handle<String> Bootstrapper::NativesSourceLookup(int index) { |
Factory* factory = isolate->factory(); |
Heap* heap = isolate->heap(); |
if (heap->natives_source_cache()->get(index)->IsUndefined()) { |
- if (!Snapshot::IsEnabled() || FLAG_new_snapshot) { |
- // We can use external strings for the natives. |
- Vector<const char> source = Natives::GetRawScriptSource(index); |
- NativesExternalStringResource* resource = |
- new NativesExternalStringResource(this, |
- source.start(), |
- source.length()); |
- Handle<String> source_code = |
- factory->NewExternalStringFromAscii(resource); |
- heap->natives_source_cache()->set(index, *source_code); |
- } else { |
- // Old snapshot code can't cope with external strings at all. |
- Handle<String> source_code = |
- factory->NewStringFromAscii(Natives::GetRawScriptSource(index)); |
- heap->natives_source_cache()->set(index, *source_code); |
- } |
+ // We can use external strings for the natives. |
+ Vector<const char> source = Natives::GetRawScriptSource(index); |
+ NativesExternalStringResource* resource = |
+ new NativesExternalStringResource(this, |
+ source.start(), |
+ source.length()); |
+ Handle<String> source_code = |
+ factory->NewExternalStringFromAscii(resource); |
+ heap->natives_source_cache()->set(index, *source_code); |
} |
Handle<Object> cached_source(heap->natives_source_cache()->get(index)); |
return Handle<String>::cast(cached_source); |