-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Richard Chamberlain <[email protected]> PR-URL: #206 Refs: #14 Reviewed-By: Matheus Marchini <[email protected]>
- Loading branch information
1 parent
c907d4e
commit c00c41e
Showing
11 changed files
with
766 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use strict'; | ||
|
||
const { | ||
fromCoredump, | ||
LLNodeHeapType, | ||
nextInstance | ||
} = require('bindings')('addon'); | ||
|
||
function *next() { | ||
let instance; | ||
while (instance = nextInstance(this)) { | ||
yield instance; | ||
} | ||
} | ||
|
||
Object.defineProperty(LLNodeHeapType.prototype, 'instances', { | ||
enumerable: false, | ||
configurable: false, | ||
get: function() { | ||
return { | ||
[Symbol.iterator]: next.bind(this) | ||
} | ||
} | ||
}); | ||
|
||
module.exports = { | ||
fromCoredump | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "llnode_module.h" | ||
#include "napi.h" | ||
|
||
namespace llnode { | ||
|
||
Napi::Object InitAll(Napi::Env env, Napi::Object exports) { | ||
Napi::Object new_exports = LLNode::Init(env, exports); | ||
return LLNodeHeapType::Init(env, new_exports); | ||
// return new_exports; | ||
} | ||
|
||
NODE_API_MODULE(addon, InitAll) | ||
|
||
} // namespace llnode |
Oops, something went wrong.