This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
n-api: enable napi_wrap() to work with any object
Change to inserting an external object into the wrapper object's prototype chain, instead of injecting an alternate `this` object in the constructor callback adapter. The latter approach didn't work in certain scenarios because the JSRT runtime still returned the original `this` object. And with this change, the setting and checking of the extension flag, which distinguished wrapper objects from external objects, can be removed. Also removing the CallbackInfo.returnValue field which is not used anymore (since we switched to direct return values). PR-URL: #269 Reviewed-By: Taylor Woll <taylor.woll@microsoft.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
- Loading branch information
Showing
1 changed file
with
35 additions
and
37 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