2010-11-17 12:28:30 +00:00
|
|
|
// Copyright 2010 the V8 project authors. All rights reserved.
|
2014-04-29 06:42:26 +00:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
2010-11-17 12:28:30 +00:00
|
|
|
|
|
|
|
#ifndef V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
|
|
|
|
#define V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
|
|
|
|
|
2015-08-11 07:34:10 +00:00
|
|
|
#include "include/v8.h"
|
2010-11-17 12:28:30 +00:00
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
|
|
|
class ExternalizeStringExtension : public v8::Extension {
|
|
|
|
public:
|
|
|
|
ExternalizeStringExtension() : v8::Extension("v8/externalize", kSource) {}
|
2018-09-14 14:55:49 +00:00
|
|
|
v8::Local<v8::FunctionTemplate> GetNativeFunctionTemplate(
|
|
|
|
v8::Isolate* isolate, v8::Local<v8::String> name) override;
|
2013-06-05 12:36:33 +00:00
|
|
|
static void Externalize(const v8::FunctionCallbackInfo<v8::Value>& args);
|
2014-09-10 12:38:12 +00:00
|
|
|
static void IsOneByte(const v8::FunctionCallbackInfo<v8::Value>& args);
|
2014-01-17 10:52:00 +00:00
|
|
|
|
2010-11-17 12:28:30 +00:00
|
|
|
private:
|
|
|
|
static const char* const kSource;
|
|
|
|
};
|
|
|
|
|
2015-09-30 13:46:56 +00:00
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|
2010-11-17 12:28:30 +00:00
|
|
|
|
|
|
|
#endif // V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
|