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_
|
|
|
|
|
2014-06-03 08:12:43 +00:00
|
|
|
#include "src/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) {}
|
2013-11-28 08:21:26 +00:00
|
|
|
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate(
|
|
|
|
v8::Isolate* isolate,
|
2010-11-17 12:28:30 +00:00
|
|
|
v8::Handle<v8::String> name);
|
2013-06-05 12:36:33 +00:00
|
|
|
static void Externalize(const v8::FunctionCallbackInfo<v8::Value>& args);
|
|
|
|
static void IsAscii(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;
|
|
|
|
};
|
|
|
|
|
|
|
|
} } // namespace v8::internal
|
|
|
|
|
|
|
|
#endif // V8_EXTENSIONS_EXTERNALIZE_STRING_EXTENSION_H_
|