| Index: src/extensions/free-buffer-extension.h
|
| diff --git a/src/default-platform.h b/src/extensions/free-buffer-extension.h
|
| similarity index 76%
|
| copy from src/default-platform.h
|
| copy to src/extensions/free-buffer-extension.h
|
| index fe1bf8e2d64e57349309fdab70c973af2fb99eb9..22d466f61e02b4e8367dfc9d06f00095aa5efe02 100644
|
| --- a/src/default-platform.h
|
| +++ b/src/extensions/free-buffer-extension.h
|
| @@ -25,31 +25,25 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#ifndef V8_DEFAULT_PLATFORM_H_
|
| -#define V8_DEFAULT_PLATFORM_H_
|
| +#ifndef V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_
|
| +#define V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_
|
|
|
| #include "v8.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| -class DefaultPlatform : public Platform {
|
| +class FreeBufferExtension : public v8::Extension {
|
| public:
|
| - DefaultPlatform();
|
| - virtual ~DefaultPlatform();
|
| -
|
| - // v8::Platform implementation.
|
| - virtual void CallOnBackgroundThread(
|
| - Task *task, ExpectedRuntime expected_runtime) V8_OVERRIDE;
|
| - virtual void CallOnForegroundThread(v8::Isolate *isolate,
|
| - Task *task) V8_OVERRIDE;
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(DefaultPlatform);
|
| + explicit FreeBufferExtension(const char* source)
|
| + : v8::Extension("v8/free-buffer", source) {}
|
| + virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate(
|
| + v8::Isolate* isolate,
|
| + v8::Handle<v8::String> name);
|
| + static void FreeBuffer(const v8::FunctionCallbackInfo<v8::Value>& args);
|
| + static void Register();
|
| };
|
|
|
| -
|
| } } // namespace v8::internal
|
|
|
| -
|
| -#endif // V8_DEFAULT_PLATFORM_H_
|
| +#endif // V8_EXTENSIONS_FREE_BUFFER_EXTENSION_H_
|
|
|