11cb0ef41Sopenharmony_ci// Copyright 2010 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci// found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci#ifndef V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
61cb0ef41Sopenharmony_ci#define V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ci#include "include/v8-extension.h"
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_cinamespace v8 {
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_citemplate <typename T>
131cb0ef41Sopenharmony_ciclass FunctionCallbackInfo;
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_cinamespace internal {
161cb0ef41Sopenharmony_ci
171cb0ef41Sopenharmony_ciclass ExternalizeStringExtension : public v8::Extension {
181cb0ef41Sopenharmony_ci public:
191cb0ef41Sopenharmony_ci  ExternalizeStringExtension() : v8::Extension("v8/externalize", kSource) {}
201cb0ef41Sopenharmony_ci  v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
211cb0ef41Sopenharmony_ci      v8::Isolate* isolate, v8::Local<v8::String> name) override;
221cb0ef41Sopenharmony_ci  static void Externalize(const v8::FunctionCallbackInfo<v8::Value>& args);
231cb0ef41Sopenharmony_ci  static void IsOneByte(const v8::FunctionCallbackInfo<v8::Value>& args);
241cb0ef41Sopenharmony_ci
251cb0ef41Sopenharmony_ci private:
261cb0ef41Sopenharmony_ci  static const char* const kSource;
271cb0ef41Sopenharmony_ci};
281cb0ef41Sopenharmony_ci
291cb0ef41Sopenharmony_ci}  // namespace internal
301cb0ef41Sopenharmony_ci}  // namespace v8
311cb0ef41Sopenharmony_ci
321cb0ef41Sopenharmony_ci#endif  // V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
33