Commit 8d7c5d5c authored by Andrew Kelley's avatar Andrew Kelley

Imported Upstream version 1.8.4

parent 419972da
language: node_js
env:
- NODE_VERSION="0.8"
- NODE_VERSION="0.10.27"
- NODE_VERSION="0.10.28"
- NODE_VERSION="0.10.29"
- NODE_VERSION="0.10.30"
- NODE_VERSION="0.11.13"
- NODE_VERSION="0.10"
- NODE_VERSION="0.12"
- NODE_VERSION="iojs"
# - NODE_WEBKIT="0.11.6" NODE_VERSION="0.11.13"
node_js:
- "0.10"
notifications:
......@@ -21,6 +20,7 @@ before_install:
- source ~/.nvm/nvm.sh
- nvm install $NODE_VERSION
- node --version
- node_modules/.bin/node-gyp rebuild --directory test
- if [[ ${NODE_VERSION} == "0.8" ]]; then node_modules/.bin/node-gyp rebuild --directory test; else node_modules/.bin/pangyp rebuild --directory test; fi
# - if [[ ${NODE_WEBKIT:-unset} != "unset" ]]; then npm install nw-gyp && ./node_modules/.bin/nw-gyp rebuild --directory test --target=$NODE_WEBKIT; fi
install:
script: tap --gc test/js/*-test.js
# NAN ChangeLog
### Version 1.3.0: current Node unstable: 0.11.13, Node stable: 0.10.30
**Version 1.8.4: current Node 12: 0.12.2, Node 10: 0.10.38, io.js: 1.8.1**
### 1.8.4 Apr 26 2015
**1.3.0 Aug 2 2014**
- Build: Repackage
### 1.8.3 Apr 26 2015
- Bugfix: Include missing header 1af8648
### 1.8.2 Apr 23 2015
- Build: Repackage
### 1.8.1 Apr 23 2015
- Bugfix: NanObjectWrapHandle should take a pointer 155f1d3
### 1.8.0 Apr 23 2015
- Feature: Allow primitives with NanReturnValue 2e4475e
- Feature: Added comparison operators to NanCallback 55b075e
- Feature: Backport thread local storage 15bb7fa
- Removal: Remove support for signatures with arguments 8a2069d
- Correcteness: Replaced NanObjectWrapHandle macro with function 0bc6d59
### 1.7.0 Feb 28 2015
- Feature: Made NanCallback::Call accept optional target 8d54da7
- Feature: Support atom-shell 0.21 0b7f1bb
### 1.6.2 Feb 6 2015
- Bugfix: NanEncode: fix argument type for node::Encode on io.js 2be8639
### 1.6.1 Jan 23 2015
- Build: version bump
### 1.5.3 Jan 23 2015
- Build: repackage
### 1.6.0 Jan 23 2015
- Deprecated `NanNewContextHandle` in favor of `NanNew<Context>` 49259af
- Support utility functions moved in newer v8 versions (Node 0.11.15, io.js 1.0) a0aa179
- Added `NanEncode`, `NanDecodeBytes` and `NanDecodeWrite` 75e6fb9
### 1.5.2 Jan 23 2015
- Bugfix: Fix non-inline definition build error with clang++ 21d96a1, 60fadd4
- Bugfix: Readded missing String constructors 18d828f
- Bugfix: Add overload handling NanNew<FunctionTemplate>(..) 5ef813b
- Bugfix: Fix uv_work_cb versioning 997e4ae
- Bugfix: Add function factory and test 4eca89c
- Bugfix: Add object template factory and test cdcb951
- Correctness: Lifted an io.js related typedef c9490be
- Correctness: Make explicit downcasts of String lengths 00074e6
- Windows: Limit the scope of disabled warning C4530 83d7deb
### 1.5.1 Jan 15 2015
- Build: version bump
### 1.4.3 Jan 15 2015
- Build: version bump
### 1.4.2 Jan 15 2015
- Feature: Support io.js 0dbc5e8
### 1.5.0 Jan 14 2015
- Feature: Support io.js b003843
- Correctness: Improved NanNew internals 9cd4f6a
- Feature: Implement progress to NanAsyncWorker 8d6a160
### 1.4.1 Nov 8 2014
- Bugfix: Handle DEBUG definition correctly
- Bugfix: Accept int as Boolean
### 1.4.0 Nov 1 2014
- Feature: Added NAN_GC_CALLBACK 6a5c245
- Performance: Removed unnecessary local handle creation 18a7243, 41fe2f8
- Correctness: Added constness to references in NanHasInstance 02c61cd
- Warnings: Fixed spurious warnings from -Wundef and -Wshadow, 541b122, 99d8cb6
- Windoze: Shut Visual Studio up when compiling 8d558c1
- License: Switch to plain MIT from custom hacked MIT license 11de983
- Build: Added test target to Makefile e232e46
- Performance: Removed superfluous scope in NanAsyncWorker f4b7821
- Sugar/Feature: Added NanReturnThis() and NanReturnHolder() shorthands 237a5ff, d697208
- Feature: Added suitable overload of NanNew for v8::Integer::NewFromUnsigned b27b450
### 1.3.0 Aug 2 2014
- Added NanNew<v8::String, std::string>(std::string)
- Added NanNew<v8::String, std::string&>(std::string&)
......@@ -21,7 +115,7 @@
- Added NanSetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ, const char *name, v8::Handle<v8::Data> value)
- Added NanSetInstanceTemplate(v8::Local<v8::FunctionTemplate> templ, v8::Handle<v8::String> name, v8::Handle<v8::Data> value, v8::PropertyAttribute attributes)
**1.2.0 Jun 5 2014**
### 1.2.0 Jun 5 2014
- Add NanSetPrototypeTemplate
- Changed NAN_WEAK_CALLBACK internals, switched _NanWeakCallbackData to class,
......@@ -29,15 +123,15 @@
- Removed -Wno-unused-local-typedefs from test builds
- Made test builds Windows compatible ('Sleep()')
**1.1.2 May 28 2014**
### 1.1.2 May 28 2014
- Release to fix more stuff-ups in 1.1.1
**1.1.1 May 28 2014**
### 1.1.1 May 28 2014
- Release to fix version mismatch in nan.h and lack of changelog entry for 1.1.0
**1.1.0 May 25 2014**
### 1.1.0 May 25 2014
- Remove nan_isolate, use v8::Isolate::GetCurrent() internally instead
- Additional explicit overloads for NanNew(): (char*,int), (uint8_t*[,int]),
......@@ -46,7 +140,7 @@
- Deprecate NanSymbol()
- Added SetErrorMessage() and ErrorMessage() to NanAsyncWorker
**1.0.0 May 4 2014**
### 1.0.0 May 4 2014
- Heavy API changes for V8 3.25 / Node 0.11.13
- Use cpplint.py
......@@ -70,18 +164,18 @@
- Introduce NanGetHeapStatistics
- Rename NanAsyncWorker#SavePersistent() to SaveToPersistent()
**0.8.0 Jan 9 2014**
### 0.8.0 Jan 9 2014
- NanDispose -> NanDisposePersistent, deprecate NanDispose
- Extract _NAN_*_RETURN_TYPE, pull up NAN_*()
**0.7.1 Jan 9 2014**
### 0.7.1 Jan 9 2014
- Fixes to work against debug builds of Node
- Safer NanPersistentToLocal (avoid reinterpret_cast)
- Speed up common NanRawString case by only extracting flattened string when necessary
**0.7.0 Dec 17 2013**
### 0.7.0 Dec 17 2013
- New no-arg form of NanCallback() constructor.
- NanCallback#Call takes Handle rather than Local
......@@ -92,58 +186,58 @@
(replacement for NanFromV8String)
- Introduce NanCString() for null-terminated char* from v8::String
**0.6.0 Nov 21 2013**
### 0.6.0 Nov 21 2013
- Introduce NanNewLocal<T>(v8::Handle<T> value) for use in place of
v8::Local<T>::New(...) since v8 started requiring isolate in Node 0.11.9
**0.5.2 Nov 16 2013**
### 0.5.2 Nov 16 2013
- Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public
**0.5.1 Nov 12 2013**
### 0.5.1 Nov 12 2013
- Use node::MakeCallback() instead of direct v8::Function::Call()
**0.5.0 Nov 11 2013**
### 0.5.0 Nov 11 2013
- Added @TooTallNate as collaborator
- New, much simpler, "include_dirs" for binding.gyp
- Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros
**0.4.4 Nov 2 2013**
### 0.4.4 Nov 2 2013
- Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+
**0.4.3 Nov 2 2013**
### 0.4.3 Nov 2 2013
- Include node_object_wrap.h, removed from node.h for Node 0.11.8.
**0.4.2 Nov 2 2013**
### 0.4.2 Nov 2 2013
- Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for
Node 0.11.8 release.
**0.4.1 Sep 16 2013**
### 0.4.1 Sep 16 2013
- Added explicit `#include <uv.h>` as it was removed from node.h for v0.11.8
**0.4.0 Sep 2 2013**
### 0.4.0 Sep 2 2013
- Added NAN_INLINE and NAN_DEPRECATED and made use of them
- Added NanError, NanTypeError and NanRangeError
- Cleaned up code
**0.3.2 Aug 30 2013**
### 0.3.2 Aug 30 2013
- Fix missing scope declaration in GetFromPersistent() and SaveToPersistent
in NanAsyncWorker
**0.3.1 Aug 20 2013**
### 0.3.1 Aug 20 2013
- fix "not all control paths return a value" compile warning on some platforms
**0.3.0 Aug 19 2013**
### 0.3.0 Aug 19 2013
- Made NAN work with NPM
- Lots of fixes to NanFromV8String, pulling in features from new Node core
......@@ -158,16 +252,16 @@
- Changed NanThrowError(Local<Value>) to NanThrowError(Handle<Value>)
- Fixed leak in NanAsyncWorker when errmsg is used
**0.2.2 Aug 5 2013**
### 0.2.2 Aug 5 2013
- Fixed usage of undefined variable with node::BASE64 in NanFromV8String()
**0.2.1 Aug 5 2013**
### 0.2.1 Aug 5 2013
- Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for
NanFromV8String()
**0.2.0 Aug 5 2013**
### 0.2.0 Aug 5 2013
- Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR,
NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY
......@@ -189,7 +283,7 @@
- Added initial test suite (to be expanded)
- Allow NanUInt32OptionValue to convert any Number object
**0.1.0 Jul 21 2013**
### 0.1.0 Jul 21 2013
- Added `NAN_GETTER`, `NAN_SETTER`
- Added `NanThrowError` with single Local<Value> argument
......
Copyright 2013, NAN contributors:
- Rod Vagg <https://github.com/rvagg>
- Benjamin Byholm <https://github.com/kkoopa>
- Trevor Norris <https://github.com/trevnorris>
- Nathan Rajlich <https://github.com/TooTallNate>
- Brett Lawson <https://github.com/brett19>
- Ben Noordhuis <https://github.com/bnoordhuis>
(the "Original Author")
All rights reserved.
MIT +no-false-attribs License
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
Distributions of all or part of the Software intended to be used
by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
modified such that the Original Author's bug reporting email
addresses and urls are either replaced with the contact information
of the parties responsible for the changes, or removed entirely.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except where noted, this license applies to any and all software
programs and associated documentation files created by the
Original Author, when distributed with the Software.
The MIT License (MIT)
=====================
Copyright (c) 2015 NAN contributors
-----------------------------------
*NAN contributors listed at <https://github.com/rvagg/nan#contributors>*
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
TOPLEVEL ?= $(dir $(lastword $(MAKEFILE_LIST)))
CPPLINT ?= $(TOPLEVEL)/cpplint.py
PYTHON ?= python
BUILDTYPE ?= Release
MODULES = symbols strings optionvalues
SOURCES = $(MODULES:%=test/cpp/%.cpp)
ADDONS = $(MODULES:%=test/build/$(BUILDTYPE)/%.node)
SOURCES = \
LINT_SOURCES = \
examples/async_pi_estimate/addon.cc \
examples/async_pi_estimate/async.cc \
examples/async_pi_estimate/async.h \
......@@ -11,14 +15,23 @@ SOURCES = \
examples/async_pi_estimate/sync.cc \
examples/async_pi_estimate/sync.h \
nan.h \
nan_string_bytes.h \
nan_implementation_12_inl.h \
nan_implementation_pre_12_inl.h \
nan_new.h \
test/cpp/asyncworker.cpp \
test/cpp/asyncprogressworker.cpp \
test/cpp/asyncworkererror.cpp \
test/cpp/bufferworkerpersistent.cpp \
test/cpp/gc.cpp \
test/cpp/morenews.cpp \
test/cpp/multifile1.cpp \
test/cpp/multifile2.cpp \
test/cpp/multifile2.h \
test/cpp/nancallback.cpp \
test/cpp/nannew.cpp \
test/cpp/news.cpp \
test/cpp/objectwraphandle.cpp \
test/cpp/optionvalues.cpp \
test/cpp/persistent.cpp \
test/cpp/returnemptystring.cpp \
......@@ -29,11 +42,21 @@ SOURCES = \
test/cpp/strings.cpp \
test/cpp/symbols.cpp \
test/cpp/weak.cpp \
test/node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
node_modules/node-gyp/gyp/data/win/large-pdb-shim.cc
FILTER = -whitespace/parens
.PHONY: lint
lint:
cd $(TOPLEVEL) && $(PYTHON) $(CPPLINT) --filter=$(FILTER) $(SOURCES)
cd $(TOPLEVEL) && $(PYTHON) $(CPPLINT) --filter=$(FILTER) $(LINT_SOURCES)
test: $(ADDONS)
npm test
forcetest:
cd test/ && node-gyp rebuild && cd ..
npm test
$(ADDONS): nan.h nan_string_bytes.h nan_new.h nan_implementation_pre_12_inl.h nan_implementation_12_inl.h test/binding.gyp $(SOURCES)
cd test/ && ../node_modules/.bin/node-gyp rebuild
This diff is collapsed.
# http://www.appveyor.com/docs/appveyor-yml
# Test against these versions of Node.js.
# Test against these versions of Io.js and Node.js.
environment:
matrix:
# node.js
- nodejs_version: "0.8"
- nodejs_version: "0.10"
- nodejs_version: "0.11"
- nodejs_version: "0.12"
# io.js
- nodejs_version: "1"
# Install scripts. (runs after repo cloning)
install:
# Get the latest stable version of Node 0.STABLE.latest
- npm install npm
- move node_modules npm
- ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
- ps: if($env:nodejs_version -eq "0.8") {Install-Product node $env:nodejs_version}
- ps: if($env:nodejs_version -ne "0.8") {Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)}
- IF NOT %nodejs_version% == 1 npm -g install npm
- IF NOT %nodejs_version% == 1 set PATH=%APPDATA%\npm;%PATH%
# Typical npm stuff.
- npm/.bin/npm install
- npm/.bin/npm run rebuild-tests
- npm install
- IF %nodejs_version% == 0.8 node node_modules\node-gyp\bin\node-gyp.js rebuild --directory test
- IF NOT %nodejs_version% == 0.8 npm run rebuild-tests
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
- cmd: npm test
# run tests
- IF NOT %nodejs_version% == 1 npm test
- IF %nodejs_version% == 1 iojs node_modules\tap\bin\tap.js --gc test\js\*-test.js
# Don't actually build.
build: off
# Set build version format here instead of in the admin panel.
version: "{build}"
This diff is collapsed.
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#include <node.h>
#include <nan.h>
#include "./sync.h"
#include "./async.h"
#include "sync.h" // NOLINT(build/include)
#include "async.h" // NOLINT(build/include)
using v8::FunctionTemplate;
using v8::Handle;
......
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2015 NAN contributors
*
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
var addon = require('./build/Release/addon');
var calculations = process.argv[2] || 100000000;
......
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#include <node.h>
#include <nan.h>
#include "./pi_est.h"
#include "./async.h"
#include "pi_est.h" // NOLINT(build/include)
#include "async.h" // NOLINT(build/include)
using v8::Function;
using v8::Local;
......
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef EXAMPLES_ASYNC_PI_ESTIMATE_ASYNC_H_
#define EXAMPLES_ASYNC_PI_ESTIMATE_ASYNC_H_
#include <node.h>
#include <nan.h>
NAN_METHOD(CalculateAsync);
......
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#include <cstdlib>
#include "./pi_est.h"
#include "pi_est.h" // NOLINT(build/include)
/*
Estimate the value of π by using a Monte Carlo method.
......@@ -42,7 +42,7 @@ double Estimate (int points) {
// unique seed for each run, for threaded use
unsigned int seed = randall(&randseed);
#ifdef _WIN32
srand(seed);
#endif
......
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef EXAMPLES_ASYNC_PI_ESTIMATE_PI_EST_H_
#define EXAMPLES_ASYNC_PI_ESTIMATE_PI_EST_H_
......
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#include <node.h>
#include <nan.h>
#include "./pi_est.h"
#include "./sync.h"
#include "pi_est.h" // NOLINT(build/include)
#include "sync.h" // NOLINT(build/include)
using v8::Number;
......
/**********************************************************************************
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
* Copyright (c) 2015 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef EXAMPLES_ASYNC_PI_ESTIMATE_SYNC_H_
#define EXAMPLES_ASYNC_PI_ESTIMATE_SYNC_H_
#include <node.h>
#include <nan.h>
NAN_METHOD(CalculateSync);
......
This diff is collapsed.
/*********************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2015 NAN contributors
*
* MIT License <https://github.com/rvagg/nan/blob/master/LICENSE.md>
********************************************************************/
#ifndef NAN_IMPLEMENTATION_12_INL_H_
#define NAN_IMPLEMENTATION_12_INL_H_
//==============================================================================
// node v0.11 implementation
//==============================================================================
#if defined(_MSC_VER)
# pragma warning( push )
# pragma warning( disable : 4530 )
# include <string>
# pragma warning( pop )
#else
# include <string>
#endif
namespace NanIntern {
//=== Array ====================================================================
Factory<v8::Array>::return_t
Factory<v8::Array>::New() {
return v8::Array::New(v8::Isolate::GetCurrent());
}
Factory<v8::Array>::return_t
Factory<v8::Array>::New(int length) {
return v8::Array::New(v8::Isolate::GetCurrent(), length);
}
//=== Boolean ==================================================================
Factory<v8::Boolean>::return_t
Factory<v8::Boolean>::New(bool value) {
return v8::Boolean::New(v8::Isolate::GetCurrent(), value);
}
//=== Boolean Object ===========================================================
Factory<v8::BooleanObject>::return_t
Factory<v8::BooleanObject>::New(bool value) {
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
}
//=== Context ==================================================================
Factory<v8::Context>::return_t
Factory<v8::Context>::New( v8::ExtensionConfiguration* extensions
, v8::Handle<v8::ObjectTemplate> tmpl
, v8::Handle<v8::Value> obj) {
return v8::Context::New(v8::Isolate::GetCurrent(), extensions, tmpl, obj);
}
//=== Date =====================================================================
Factory<v8::Date>::return_t
Factory<v8::Date>::New(double value) {
return v8::Date::New(v8::Isolate::GetCurrent(), value).As<v8::Date>();
}
//=== External =================================================================
Factory<v8::External>::return_t
Factory<v8::External>::New(void * value) {
return v8::External::New(v8::Isolate::GetCurrent(), value);
}
//=== Function =================================================================
Factory<v8::Function>::return_t
Factory<v8::Function>::New( NanFunctionCallback callback
, v8::Handle<v8::Value> data) {
return v8::Function::New( v8::Isolate::GetCurrent()
, callback
, data);
}
//=== Function Template ========================================================
Factory<v8::FunctionTemplate>::return_t
Factory<v8::FunctionTemplate>::New( NanFunctionCallback callback
, v8::Handle<v8::Value> data
, v8::Handle<v8::Signature> signature) {
return v8::FunctionTemplate::New( v8::Isolate::GetCurrent()
, callback
, data
, signature);
}
//=== Number ===================================================================
Factory<v8::Number>::return_t
Factory<v8::Number>::New(double value) {
return v8::Number::New(v8::Isolate::GetCurrent(), value);
}
//=== Number Object ============================================================
Factory<v8::NumberObject>::return_t
Factory<v8::NumberObject>::New(double value) {
return v8::NumberObject::New( v8::Isolate::GetCurrent()
, value).As<v8::NumberObject>();
}
//=== Integer, Int32 and Uint32 ================================================