MCPcopy Create free account
hub / github.com/nodejs/nan / HandleScope

Class HandleScope

nan.h:446–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444//=== HandleScope ==============================================================
445
446class HandleScope {
447 v8::HandleScope scope;
448
449 public:
450#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
451 inline HandleScope() : scope(v8::Isolate::GetCurrent()) {}
452 inline static int NumberOfHandles() {
453 return v8::HandleScope::NumberOfHandles(v8::Isolate::GetCurrent());
454 }
455#else
456 inline HandleScope() : scope() {}
457 inline static int NumberOfHandles() {
458 return v8::HandleScope::NumberOfHandles();
459 }
460#endif
461
462 private:
463 // Make it hard to create heap-allocated or illegal handle scopes by
464 // disallowing certain operations.
465 HandleScope(const HandleScope &);
466 void operator=(const HandleScope &);
467 void *operator new(size_t size);
468 void operator delete(void *, size_t) {
469 abort();
470 }
471};
472
473class EscapableHandleScope {
474 public:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected