diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-06-11 23:45:46 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-06-11 23:46:00 +0200 |
commit | 6dd78074a3c0a7579ca5e919021587c22ff763ae (patch) | |
tree | e225460f8e76126f4e4b2e1809dbd4c9c2ba511b /deps/v8/src/api.h | |
parent | 9ae1d182ba98629ac7c7b9100022ac93133494b7 (diff) | |
download | node-new-6dd78074a3c0a7579ca5e919021587c22ff763ae.tar.gz |
v8: upgrade to v3.19.13
Diffstat (limited to 'deps/v8/src/api.h')
-rw-r--r-- | deps/v8/src/api.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/deps/v8/src/api.h b/deps/v8/src/api.h index 12d6e3d082..3c141f7097 100644 --- a/deps/v8/src/api.h +++ b/deps/v8/src/api.h @@ -126,8 +126,9 @@ template <typename T> inline T ToCData(v8::internal::Object* obj) { template <typename T> inline v8::internal::Handle<v8::internal::Object> FromCData(T obj) { + v8::internal::Isolate* isolate = v8::internal::Isolate::Current(); STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); - return FACTORY->NewForeign( + return isolate->factory()->NewForeign( reinterpret_cast<v8::internal::Address>(reinterpret_cast<intptr_t>(obj))); } @@ -636,8 +637,13 @@ void HandleScopeImplementer::DeleteExtensions(internal::Object** prev_limit) { internal::Object** block_start = blocks_.last(); internal::Object** block_limit = block_start + kHandleBlockSize; #ifdef DEBUG - // NoHandleAllocation may make the prev_limit to point inside the block. - if (block_start <= prev_limit && prev_limit <= block_limit) break; + // SealHandleScope may make the prev_limit to point inside the block. + if (block_start <= prev_limit && prev_limit <= block_limit) { +#ifdef ENABLE_EXTRA_CHECKS + internal::HandleScope::ZapRange(prev_limit, block_limit); +#endif + break; + } #else if (prev_limit == block_limit) break; #endif |