src: return Maybe from a couple of functions · nodejs/node@0a7f850 · GitHub
Skip to content

Commit 0a7f850

Browse files
RaisinTenjasnell
authored andcommitted
src: return Maybe from a couple of functions
Functions affected: * InitializeContext() * InitializeContextForSnapshot() * InitializePrimordials() Signed-off-by: Darshan Sen <darshan.sen@postman.com> PR-URL: #39603 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 26632c9 commit 0a7f850

3 files changed

Lines changed: 23 additions & 18 deletions

File tree

src/api/environment.cc

Lines changed: 19 additions & 15 deletions

src/node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ NODE_EXTERN v8::Local<v8::Context> NewContext(
367367

368368
// Runs Node.js-specific tweaks on an already constructed context
369369
// Return value indicates success of operation
370-
NODE_EXTERN bool InitializeContext(v8::Local<v8::Context> context);
370+
NODE_EXTERN v8::Maybe<bool> InitializeContext(v8::Local<v8::Context> context);
371371

372372
// If `platform` is passed, it will be used to register new Worker instances.
373373
// It can be `nullptr`, in which case creating new Workers inside of

src/node_internals.h

Lines changed: 3 additions & 2 deletions

0 commit comments

Comments
 (0)