Commit 86eae01a authored by Jérémy Lal's avatar Jérémy Lal

Imported Upstream version 0.10.34~dfsg

parent 6d2fa6dc
......@@ -15,6 +15,7 @@ node_g
.benchmark_reports
/.project
/.cproject
icu_config.gypi
/out
......
......@@ -515,6 +515,13 @@ Kevin Simper <kevin.simper@gmail.com>
Jackson Tian <shyvo1987@gmail.com>
Tristan Berger <tristan.berger@gmail.com>
Mathias Schreck <schreck.mathias@googlemail.com>
Calvin Metcalf <cmetcalf@appgeo.com>
Matthew Fitzsimmons <matt@fitzage.com>
Swaagie <info@martijnswaagman.nl>
Emmanuel Odeke <emmanuel.odeke@cmgcanada.ca>
Eric Mill <eric@konklone.com>
Brendan Ashworth <squirrelslikeacorns@gmail.com>
Alejandro Oviedo <alejandro.oviedo.g@gmail.com>
pkcs <pkcs@gmx.com>
Saúl Ibarra Corretgé <saghul@gmail.com>
silverwind <silv3rwind@gmail.com>
Steven R. Loomis <srl@icu-project.org>
2014.10.20, Version 0.10.33 (Stable)
2014.12.17, Version 0.10.34 (Stable)
* uv: update to v0.10.30
* zlib: upgrade to v1.2.8
* child_process: check execFile args is an array (Sam Roberts)
* child_process: check fork args is an array (Sam Roberts)
* crypto: update root certificates (Ben Noordhuis)
* domains: fix issues with abort on uncaught (Julien Gilli)
* timers: Avoid linear scan in _unrefActive. (Julien Gilli)
* timers: fix unref() memory leak (Trevor Norris)
* v8: add api for aborting on uncaught exception (Julien Gilli)
* debugger: fix when using "use strict" (Julien Gilli)
2014.10.20, Version 0.10.33 (Stable), 8d045a30e95602b443eb259a5021d33feb4df079
* openssl: Update to 1.0.1j (Addressing multiple CVEs)
......@@ -71,7 +94,7 @@
* deps: backport 4ed5fde4f from v8 upstream (Fedor Indutny)
* deps: cherry-pick eca441b2 from OpenSSL (Fedor Indutny)
*
* lib: remove and restructure calls to isNaN() (cjihrig)
......
......@@ -294,9 +294,9 @@ maintained libraries. The externally maintained libraries used by Node are:
- Zlib at deps/zlib. zlib's license follows:
"""
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.4, March 14th, 2010
version 1.2.8, April 28th, 2013
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
......@@ -314,9 +314,8 @@ maintained libraries. The externally maintained libraries used by Node are:
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly
Mark Adler
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
*/
"""
......
......@@ -730,4 +730,4 @@ else:
gyp_args += args
subprocess.call(gyp_args)
sys.exit(subprocess.call(gyp_args))
......@@ -131,3 +131,4 @@ Paul Tan <pyokagan@gmail.com>
Javier Hernández <jhernandez@emergya.com>
Tonis Tiigi <tonistiigi@gmail.com>
Michael Hudson-Doyle <michael.hudson@linaro.org>
Helge Deller <deller@gmx.de>
2014.10.21, Version 0.10.29 (Stable)
2014.12.10, Version 0.10.30 (Stable)
Changes since version 0.10.29:
* linux: fix sigmask size arg in epoll_pwait() call (Ben Noordhuis)
* linux: handle O_NONBLOCK != SOCK_NONBLOCK case (Helge Deller)
* doc: update project links (Ben Noordhuis)
* windows: fix compilation of tests (Marc Schlaich)
* unix: add flag for blocking SIGPROF during poll (Ben Noordhuis)
* unix, windows: add uv_loop_configure() function (Ben Noordhuis)
* win: keep a reference to AFD_POLL_INFO in cancel poll (Marc Schlaich)
2014.10.21, Version 0.10.29 (Stable), 2d728542d3790183417f8f122a110693cd85db14
Changes since version 0.10.28:
......
......@@ -42,13 +42,13 @@ http://nodejs.org/
## Documentation
* [include/uv.h](https://github.com/joyent/libuv/blob/master/include/uv.h)
* [include/uv.h](https://github.com/libuv/libuv/blob/master/include/uv.h)
&mdash; API documentation in the form of detailed header comments.
* [An Introduction to libuv](http://nikhilm.github.com/uvbook/) &mdash; An
overview of libuv with tutorials.
* [LXJS 2012 talk](http://www.youtube.com/watch?v=nGn60vDSxQ4) - High-level
introductory talk about libuv.
* [Tests and benchmarks](https://github.com/joyent/libuv/tree/master/test) -
* [Tests and benchmarks](https://github.com/libuv/libuv/tree/master/test) -
API specification and usage examples.
## Build Instructions
......
......@@ -474,7 +474,10 @@ RB_HEAD(uv_timer_tree_s, uv_timer_s);
/* Used in fast mode */ \
SOCKET peer_socket; \
AFD_POLL_INFO afd_poll_info_1; \
AFD_POLL_INFO afd_poll_info_2; \
union { \
AFD_POLL_INFO* afd_poll_info_ptr; \
AFD_POLL_INFO afd_poll_info; \
} afd_poll_info_2; \
/* Used in fast and slow mode. */ \
uv_req_t poll_req_1; \
uv_req_t poll_req_2; \
......
......@@ -226,6 +226,16 @@ typedef struct uv_work_s uv_work_t;
typedef struct uv_cpu_info_s uv_cpu_info_t;
typedef struct uv_interface_address_s uv_interface_address_t;
typedef enum {
/* Block a signal when polling for new events. The second argument to
* uv_loop_configure() is the signal number.
*
* This operation is currently only implemented for SIGPROF signals,
* to suppress unnecessary wakeups when using a sampling profiler.
* Requesting other signals will fail with UV_EINVAL.
*/
UV_LOOP_BLOCK_SIGNAL
} uv_loop_option;
typedef enum {
UV_RUN_DEFAULT = 0,
......@@ -264,6 +274,15 @@ UV_EXTERN void uv_loop_delete(uv_loop_t*);
*/
UV_EXTERN uv_loop_t* uv_default_loop(void);
/*
* Set additional loop options. You should normally call this before the
* first call to uv_run() unless mentioned otherwise.
*
* Returns 0 on success or a UV_E* error code on failure. Be prepared to
* handle UV_ENOSYS; it means the loop option is not supported by the platform.
*/
UV_EXTERN int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...);
/*
* This function runs the event loop. It will act differently depending on the
* specified mode:
......
......@@ -111,6 +111,11 @@ enum {
UV_TCP_SINGLE_ACCEPT = 0x400 /* Only accept() when idle. */
};
/* loop flags */
enum {
UV_LOOP_BLOCK_SIGPROF = 1
};
/* core */
int uv__nonblock(int fd, int set);
int uv__cloexec(int fd, int set);
......
......@@ -56,9 +56,11 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
unsigned int nevents;
unsigned int revents;
ngx_queue_t* q;
uv__io_t* w;
sigset_t* pset;
sigset_t set;
uint64_t base;
uint64_t diff;
uv__io_t* w;
int filter;
int fflags;
int count;
......@@ -118,6 +120,13 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
w->events = w->pevents;
}
pset = NULL;
if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
pset = &set;
sigemptyset(pset);
sigaddset(pset, SIGPROF);
}
assert(timeout >= -1);
base = loop->time;
count = 48; /* Benchmarks suggest this gives the best throughput. */
......@@ -128,6 +137,9 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
spec.tv_nsec = (timeout % 1000) * 1000000;
}
if (pset != NULL)
pthread_sigmask(SIG_BLOCK, pset, NULL);
nfds = kevent(loop->backend_fd,
events,
nevents,
......@@ -135,6 +147,9 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
ARRAY_SIZE(events),
timeout == -1 ? NULL : &spec);
if (pset != NULL)
pthread_sigmask(SIG_UNBLOCK, pset, NULL);
/* Update loop->time unconditionally. It's tempting to skip the update when
* timeout == 0 (i.e. non-blocking poll) but there is no guarantee that the
* operating system didn't reschedule our process while in the syscall.
......
......@@ -33,6 +33,7 @@
#include <sys/prctl.h>
#include <sys/sysinfo.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <time.h>
......@@ -130,6 +131,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
struct uv__epoll_event e;
ngx_queue_t* q;
uv__io_t* w;
sigset_t* pset;
sigset_t set;
uint64_t base;
uint64_t diff;
int nevents;
......@@ -180,12 +183,25 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
w->events = w->pevents;
}
pset = NULL;
if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
pset = &set;
sigemptyset(pset);
sigaddset(pset, SIGPROF);
}
assert(timeout >= -1);
base = loop->time;
count = 48; /* Benchmarks suggest this gives the best throughput. */
for (;;) {
if (!no_epoll_wait) {
if (no_epoll_wait || pset != NULL) {
nfds = uv__epoll_pwait(loop->backend_fd,
events,
ARRAY_SIZE(events),
timeout,
pset);
} else {
nfds = uv__epoll_wait(loop->backend_fd,
events,
ARRAY_SIZE(events),
......@@ -194,12 +210,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
no_epoll_wait = 1;
continue;
}
} else {
nfds = uv__epoll_pwait(loop->backend_fd,
events,
ARRAY_SIZE(events),
timeout,
NULL);
}
/* Update loop->time unconditionally. It's tempting to skip the update when
......
......@@ -21,6 +21,7 @@
#include "linux-syscalls.h"
#include <unistd.h>
#include <signal.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <errno.h>
......@@ -298,7 +299,7 @@ int uv__epoll_pwait(int epfd,
nevents,
timeout,
sigmask,
sizeof(*sigmask));
_NSIG / 8);
#else
return errno = ENOSYS, -1;
#endif
......
......@@ -43,7 +43,7 @@
#if defined(__alpha__)
# define UV__O_NONBLOCK 0x4
#elif defined(__hppa__)
# define UV__O_NONBLOCK 0x10004
# define UV__O_NONBLOCK O_NONBLOCK
#elif defined(__mips__)
# define UV__O_NONBLOCK 0x80
#elif defined(__sparc__)
......@@ -59,7 +59,11 @@
#define UV__IN_NONBLOCK UV__O_NONBLOCK
#define UV__SOCK_CLOEXEC UV__O_CLOEXEC
#define UV__SOCK_NONBLOCK UV__O_NONBLOCK
#if defined(SOCK_NONBLOCK)
# define UV__SOCK_NONBLOCK SOCK_NONBLOCK
#else
# define UV__SOCK_NONBLOCK UV__O_NONBLOCK
#endif
/* epoll flags */
#define UV__EPOLL_CLOEXEC UV__O_CLOEXEC
......
......@@ -112,3 +112,15 @@ void uv__loop_delete(uv_loop_t* loop) {
loop->watchers = NULL;
loop->nwatchers = 0;
}
int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
if (option != UV_LOOP_BLOCK_SIGNAL)
return UV_ENOSYS;
if (va_arg(ap, int) != SIGPROF)
return UV_EINVAL;
loop->flags |= UV_LOOP_BLOCK_SIGPROF;
return 0;
}
......@@ -112,6 +112,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
struct timespec spec;
ngx_queue_t* q;
uv__io_t* w;
sigset_t* pset;
sigset_t set;
uint64_t base;
uint64_t diff;
unsigned int nfds;
......@@ -119,6 +121,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
int saved_errno;
int nevents;
int count;
int err;
int fd;
if (loop->nfds == 0) {
......@@ -140,6 +143,13 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
w->events = w->pevents;
}
pset = NULL;
if (loop->flags & UV_LOOP_BLOCK_SIGPROF) {
pset = &set;
sigemptyset(pset);
sigaddset(pset, SIGPROF);
}
assert(timeout >= -1);
base = loop->time;
count = 48; /* Benchmarks suggest this gives the best throughput. */
......@@ -155,11 +165,20 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
nfds = 1;
saved_errno = 0;
if (port_getn(loop->backend_fd,
events,
ARRAY_SIZE(events),
&nfds,
timeout == -1 ? NULL : &spec)) {
if (pset != NULL)
pthread_sigmask(SIG_BLOCK, pset, NULL);
err = port_getn(loop->backend_fd,
events,
ARRAY_SIZE(events),
&nfds,
timeout == -1 ? NULL : &spec);
if (pset != NULL)
pthread_sigmask(SIG_UNBLOCK, pset, NULL);
if (err) {
/* Work around another kernel bug: port_getn() may return events even
* on error.
*/
......
......@@ -24,6 +24,7 @@
#include <stdio.h>
#include <assert.h>
#include <stdarg.h>
#include <stddef.h> /* NULL */
#include <stdlib.h> /* malloc */
#include <string.h> /* memset */
......@@ -434,3 +435,16 @@ void uv_stop(uv_loop_t* loop) {
uint64_t uv_now(uv_loop_t* loop) {
return loop->time;
}
int uv_loop_configure(uv_loop_t* loop, uv_loop_option option, ...) {
va_list ap;
int err;
va_start(ap, option);
/* Any platform-agnostic options should be handled here. */
err = uv__loop_configure(loop, option, ap);
va_end(ap);
return err;
}
......@@ -28,6 +28,7 @@
#define UV_COMMON_H_
#include <assert.h>
#include <stdarg.h>
#include <stddef.h>
#if defined(_MSC_VER) && _MSC_VER < 1600
......@@ -77,6 +78,7 @@ int uv__set_artificial_error(uv_loop_t* loop, uv_err_code code);
uv_err_t uv__new_sys_error(int sys_error);
uv_err_t uv__new_artificial_error(uv_err_code code);
int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap);
int uv__tcp_bind(uv_tcp_t* handle, struct sockaddr_in addr);
int uv__tcp_bind6(uv_tcp_t* handle, struct sockaddr_in6 addr);
......
......@@ -34,7 +34,7 @@
#define UV_VERSION_MAJOR 0
#define UV_VERSION_MINOR 10
#define UV_VERSION_PATCH 29
#define UV_VERSION_PATCH 30
#define UV_VERSION_IS_RELEASE 1
......
......@@ -174,6 +174,11 @@ void uv_loop_delete(uv_loop_t* loop) {
}
int uv__loop_configure(uv_loop_t* loop, uv_loop_option option, va_list ap) {
return UV_ENOSYS;
}
int uv_backend_fd(const uv_loop_t* loop) {
return -1;
}
......
......@@ -79,7 +79,7 @@ static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
handle->mask_events_2 = handle->events;
} else if (handle->submitted_events_2 == 0) {
req = &handle->poll_req_2;
afd_poll_info = &handle->afd_poll_info_2;
afd_poll_info = &handle->afd_poll_info_2.afd_poll_info_ptr[0];
handle->submitted_events_2 = handle->events;
handle->mask_events_1 = handle->events;
handle->mask_events_2 = 0;
......@@ -118,18 +118,19 @@ static void uv__fast_poll_submit_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
static int uv__fast_poll_cancel_poll_req(uv_loop_t* loop, uv_poll_t* handle) {
AFD_POLL_INFO afd_poll_info;
AFD_POLL_INFO* afd_poll_info;
DWORD result;
afd_poll_info.Exclusive = TRUE;
afd_poll_info.NumberOfHandles = 1;
afd_poll_info.Timeout.QuadPart = INT64_MAX;
afd_poll_info.Handles[0].Handle = (HANDLE) handle->socket;
afd_poll_info.Handles[0].Status = 0;
afd_poll_info.Handles[0].Events = AFD_POLL_ALL;
afd_poll_info = &handle->afd_poll_info_2.afd_poll_info_ptr[1];
afd_poll_info->Exclusive = TRUE;
afd_poll_info->NumberOfHandles = 1;
afd_poll_info->Timeout.QuadPart = INT64_MAX;
afd_poll_info->Handles[0].Handle = (HANDLE) handle->socket;
afd_poll_info->Handles[0].Status = 0;
afd_poll_info->Handles[0].Events = AFD_POLL_ALL;
result = uv_msafd_poll(handle->socket,
&afd_poll_info,
afd_poll_info,
uv__get_overlapped_dummy());
if (result == SOCKET_ERROR) {
......@@ -154,7 +155,7 @@ static void uv__fast_poll_process_poll_req(uv_loop_t* loop, uv_poll_t* handle,
handle->submitted_events_1 = 0;
mask_events = handle->mask_events_1;
} else if (req == &handle->poll_req_2) {
afd_poll_info = &handle->afd_poll_info_2;
afd_poll_info = &handle->afd_poll_info_2.afd_poll_info_ptr[0];
handle->submitted_events_2 = 0;
mask_events = handle->mask_events_2;
} else {
......@@ -551,6 +552,12 @@ int uv_poll_init_socket(uv_loop_t* loop, uv_poll_t* handle,
handle->poll_req_2.type = UV_POLL_REQ;
handle->poll_req_2.data = handle;
handle->afd_poll_info_2.afd_poll_info_ptr = malloc(sizeof(*handle->afd_poll_info_2.afd_poll_info_ptr) * 2);
if (handle->afd_poll_info_2.afd_poll_info_ptr == NULL) {
uv__set_artificial_error(loop, UV_ENOMEM);
return -1;
}
return 0;
}
......@@ -604,5 +611,9 @@ void uv_poll_endgame(uv_loop_t* loop, uv_poll_t* handle) {
assert(handle->submitted_events_1 == 0);
assert(handle->submitted_events_2 == 0);
if (handle->afd_poll_info_2.afd_poll_info_ptr) {
free(handle->afd_poll_info_2.afd_poll_info_ptr);
handle->afd_poll_info_2.afd_poll_info_ptr = NULL;
}
uv__handle_close(handle);
}
......@@ -67,8 +67,7 @@ TEST_IMPL(poll_closesocket) {
r = ioctlsocket(sock, FIONBIO, &on);
ASSERT(r == 0);
r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr);
ASSERT(r == 0);
addr = uv_ip4_addr("127.0.0.1", TEST_PORT);
r = connect(sock, (const struct sockaddr*) &addr, sizeof addr);
ASSERT(r != 0);
......
......@@ -2845,6 +2845,17 @@ class V8EXPORT Isolate {
*/
static Isolate* GetCurrent();
/**
* Custom callback used by embedders to help V8 determine if it should abort
* when it throws and no internal handler can catch the exception.
* If FLAG_abort_on_uncaught_exception is true, then V8 will abort if either:
* - no custom callback is set.
* - the custom callback set returns true.
* Otherwise it won't abort.
*/
typedef bool (*abort_on_uncaught_exception_t)();
void SetAbortOnUncaughtException(abort_on_uncaught_exception_t callback);
/**
* Methods below this point require holding a lock (using Locker) in
* a multi-threaded environment.
......
......@@ -5565,6 +5565,11 @@ void Isolate::Enter() {
isolate->Enter();
}
void Isolate::SetAbortOnUncaughtException(
abort_on_uncaught_exception_t callback) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
isolate->SetAbortOnUncaughtException(callback);
}
void Isolate::Exit() {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
......
......@@ -24,6 +24,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"use strict";
// Default number of frames to include in the response to backtrace request.
var kDefaultBacktraceLength = 10;
......@@ -442,7 +443,7 @@ ScriptBreakPoint.prototype.set = function (script) {
if (position === null) return;
// Create a break point object and set the break point.
break_point = MakeBreakPoint(position, this);
var break_point = MakeBreakPoint(position, this);
break_point.setIgnoreCount(this.ignoreCount());
var actual_position = %SetScriptBreakPoint(script, position, break_point);
if (IS_UNDEFINED(actual_position)) {
......@@ -677,7 +678,7 @@ Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) {
Debug.setBreakPointByScriptIdAndPosition = function(script_id, position,
condition, enabled)
{
break_point = MakeBreakPoint(position);
var break_point = MakeBreakPoint(position);
break_point.setCondition(condition);
if (!enabled) {
break_point.disable();
......@@ -742,7 +743,7 @@ Debug.clearBreakPoint = function(break_point_number) {
Debug.clearAllBreakPoints = function() {
for (var i = 0; i < break_points.length; i++) {
break_point = break_points[i];
var break_point = break_points[i];
%ClearBreakPoint(break_point);
}
break_points = [];
......
......@@ -1152,18 +1152,26 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
thread_local_top()->pending_message_end_pos_ = location->end_pos();
}
// If the abort-on-uncaught-exception flag is specified, abort on any
// exception not caught by JavaScript, even when an external handler is
// present. This flag is intended for use by JavaScript developers, so
// print a user-friendly stack trace (not an internal one).
// If the abort-on-uncaught-exception flag is specified, and if the
// exception is not caught by JavaScript (even when an external handler is
// present).
if (fatal_exception_depth == 0 &&
FLAG_abort_on_uncaught_exception &&
(report_exception || can_be_caught_externally)) {
fatal_exception_depth++;
fprintf(stderr, "%s\n\nFROM\n",
*MessageHandler::GetLocalizedMessage(message_obj));
PrintCurrentStackTrace(stderr);
OS::Abort();
// If the embedder didn't specify a custom uncaught exception callback,
// or if the custom callback determined that V8 should abort, then
// abort
bool should_abort = !abort_on_uncaught_exception_callback_ ||
abort_on_uncaught_exception_callback_();
if (should_abort) {
fatal_exception_depth++;
// This flag is intended for use by JavaScript developers, so
// print a user-friendly stack trace (not an internal one).
fprintf(stderr, "%s\n\nFROM\n",
*MessageHandler::GetLocalizedMessage(message_obj));
PrintCurrentStackTrace(stderr);
OS::Abort();
}
}
} else if (location != NULL && !location->script().is_null()) {
// We are bootstrapping and caught an error where the location is set
......@@ -1339,6 +1347,10 @@ void Isolate::SetCaptureStackTraceForUncaughtExceptions(
stack_trace_for_uncaught_exceptions_options_ = options;
}
void Isolate::SetAbortOnUncaughtException(
v8::Isolate::abort_on_uncaught_exception_t callback) {
abort_on_uncaught_exception_callback_ = callback;
}
bool Isolate::is_out_of_memory() {
if (has_pending_exception()) {
......@@ -1534,7 +1546,8 @@ Isolate::Isolate()
date_cache_(NULL),
context_exit_happened_(false),
deferred_handles_head_(NULL),
optimizing_compiler_thread_(this) {
optimizing_compiler_thread_(this),
abort_on_uncaught_exception_callback_(NULL) {
TRACE_ISOLATE(constructor);
memset(isolate_addresses_, 0,
......
......@@ -692,6 +692,9 @@ class Isolate {
int frame_limit,
StackTrace::StackTraceOptions options);
typedef bool (*abort_on_uncaught_exception_t)();
void SetAbortOnUncaughtException(abort_on_uncaught_exception_t callback);
// Tells whether the current context has experienced an out of memory
// exception.
bool is_out_of_memory();
......@@ -1292,6 +1295,8 @@ class Isolate {
DeferredHandles* deferred_handles_head_;
OptimizingCompilerThread optimizing_compiler_thread_;
abort_on_uncaught_exception_t abort_on_uncaught_exception_callback_;
friend class ExecutionAccess;
friend class HandleScopeImplementer;
friend class IsolateInitializer;
......
......@@ -24,6 +24,7 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"use strict";
// Handle id counters.
var next_handle_ = 0;
......@@ -55,7 +56,7 @@ function MakeMirror(value, opt_transient) {
// Look for non transient mirrors in the mirror cache.
if (!opt_transient) {
for (id in mirror_cache_) {
for (var id in mirror_cache_) {
mirror = mirror_cache_[id];
if (mirror.value() === value) {