| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/extensions/externalize-string-extension.h" | 5 #include "src/extensions/externalize-string-extension.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/handles.h" | 8 #include "src/handles.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/objects-inl.h" |
| 10 | 11 |
| 11 namespace v8 { | 12 namespace v8 { |
| 12 namespace internal { | 13 namespace internal { |
| 13 | 14 |
| 14 template <typename Char, typename Base> | 15 template <typename Char, typename Base> |
| 15 class SimpleStringResource : public Base { | 16 class SimpleStringResource : public Base { |
| 16 public: | 17 public: |
| 17 // Takes ownership of |data|. | 18 // Takes ownership of |data|. |
| 18 SimpleStringResource(Char* data, size_t length) | 19 SimpleStringResource(Char* data, size_t length) |
| 19 : data_(data), | 20 : data_(data), |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 NewStringType::kNormal).ToLocalChecked()); | 134 NewStringType::kNormal).ToLocalChecked()); |
| 134 return; | 135 return; |
| 135 } | 136 } |
| 136 bool is_one_byte = | 137 bool is_one_byte = |
| 137 Utils::OpenHandle(*args[0].As<v8::String>())->IsOneByteRepresentation(); | 138 Utils::OpenHandle(*args[0].As<v8::String>())->IsOneByteRepresentation(); |
| 138 args.GetReturnValue().Set(is_one_byte); | 139 args.GetReturnValue().Set(is_one_byte); |
| 139 } | 140 } |
| 140 | 141 |
| 141 } // namespace internal | 142 } // namespace internal |
| 142 } // namespace v8 | 143 } // namespace v8 |
| OLD | NEW |